Quick Tip 7 – CSS !Important

This isn’t something to use on a regular basis but a very useful tool when you need it.
Quick Tip Gary
Another simple tip today, the !important rule in CSS. This little snippet will help you override any rule that is already assigned. For Example:


body { background-color:#000 !important; background-color:#CCC;}

Now the background colour of Black will be assigned over the Grey even though Grey is assigned over Black.

Related posts:

  1. Quick Tip 5 – Compact CSS
  2. Quick Tip 6 – CSS Shorthand
  3. Quick Tip 9 – CSS min height
  4. Quick Tip 2 – CSS Text Shadow
  5. Quick Tip 10 – CSS Vertical Alignment

Tags: ,

Leave a Reply

Contact Us Today...

For more information regarding any of our services or to arrange a free consultation simply send us a message or call 02920 290 080 for Cardiff and 01179 000 482 for Bristol.

Firefox 4 Beta

Mozilla have released the first beta version of Firefox 4. The latest version of this browser will include better support for many of the new web technologies, a new add on manager, crash protection from third party plugins and accelerated hardware support. One of the most obvious changes is that the tabs have now been moved [...]
» more

Cardiff: 02920 290 080 Bristol: 01179 000 482