Archive for CSS / HTML

It’s !important

Funny how after years of playing with CSS I hadn’t come across the !important  attribute. To be honest that was probably a Good Thing and should as a rule be treated just like ‘C’s “goto” statement – just don’t do it, there’s always a better way.

The !important  attribute will, I guess, be read by most programmers as “NOT important”, but this being CSS actually means it IS important and can be used to force a CSS rule to take precedence regardless of the structure of the CSS. Lets use an example:

Read more