Jump to content
Sign in to follow this  
intellagentz

Custom CSS question

Recommended Posts

intellagentz

If you include custom code CSS section within the Platform framework, does it override a similar existing code or is only used for additional code. Ex. a specific font color=blue I enter a custom code that refers to same class but select red, instead. Does my code override or do I have to actually delete the other code in the stylesheet?

Share this post


Link to post
Share on other sites
kastelic

It should override it. Style sheets "cascade" meaning styles override the one above them. For example:

	h1,h2,h3{color:black}
	
	h1{color:red}

The color of an h1 will be red.

Share this post


Link to post
Share on other sites
intellagentz

For some reason, it didn't. In my case, the stylesheet was refer a Section stylesheet (superfish.css) Not sure if that was the reason.

Share this post


Link to post
Share on other sites
Andrew

it will override, just make sure it is more specific than the original rule: e.g. original `body p{background...}` more specific `body #page p{background...}`

Share this post


Link to post
Share on other sites
intellagentz

That's the thing, what if it's not more specific and simply a different value. Would that explain why it would NOT override? If so, is that a case where one needs to edit the CSS file itself?

Share this post


Link to post
Share on other sites
Andrew

Never edit the CSS itself, or else you'll have problems updating. Just try and make it more specific, that's the correct way to do it :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×