O'Reilly logo

Microsoft® SharePoint® Designer 2010 Unleashed by Kathy Hughes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required