Cross-post from umarfarukm.com/blog/

If you want overwrite a particular style to avoid conflicts, try the below one. its working perfectly for me.

For example, If you write a different style's for same tag (tag, class, id whatever) then the HTML considers only the last call of style from the .CSS file.

the following screenshot will help you.

http://lh4.ggpht.com/_H9h3HTbpYNc/S5kN69tP77I/AAAAAAAAEv4/hs70OFPyWss/without_important.jpg

Result of the above Style

http://lh4.ggpht.com/_H9h3HTbpYNc/S5kN7BayhtI/AAAAAAAAEwA/oDueBP7cmjQ/without_important_output.jpg

After Adding !important at the end of style

http://lh5.ggpht.com/_H9h3HTbpYNc/S5kN60IEbdI/AAAAAAAAEv0/rp6_uL9w0Cw/with_important.jpg

Result of the above Style

http://lh5.ggpht.com/_H9h3HTbpYNc/S5kN7Gc_SGI/AAAAAAAAEv8/iaOXV6O3ggo/without_important_output-04.jpg

If you add !imporant at the end of style then HTML will give higher priority for the style