Friday, August 28, 2009

Important in CSS

I was going over a body background color issue in a pre-built page, and found that the page is awkward due to usage of "!important" keyword for body-background.

The first CSS has set the background as white with "!important"; while a theme specific CSS, which is loaded later, is setting the background color with "!important" keyword. The latter should take precedence as it is Theme specific, whereas the first is default.

As I said it is default the "!important" keyword is removed to get the look back... Read this pod to get more info on this...

The most important aspect to note here is the keyword "!important". To speak in programmatic language it literally means "not important". But it is Important!!!

No comments: