The !Important Property is your Friend!

When you read through the corev4.css file you see a number of !importants against styles. The !important directive is there for a good reason! I remember a colleague of mine once saying that he’d gone through and deleted all instances of the !important directive because he thought it was just someone at Microsoft trying to suggest the more important styles over others and that it was therefore redundant. Well, he was right—at least about the part of the !important directive highlighting the importance of some styles over others.

You see, the !important directive does just that—takes precedence over other properties with the same values. For instance, if I have created a style in my custom CSS file of .acme ...

Get Microsoft® SharePoint® Designer 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.