OverrideCSS

Summary: How to override previously defined styles without modifying the skin
Version: 2006-01-29
Prerequisites: Last tested on PmWiki version: pmwiki-2.1.beta22
Status:
Maintainer: floozy
Categories: Layout, CSS
Discussion: OverrideCSS-Talk
Users: (view? / edit)

Question

New CSS styles can easily be added using the $HTMLStylesFmt variable. But how to override previously defined styles without modifying the skin?

Answer

Add new CSS styles using the !important directive:

$HTMLStylesFmt[] = ".vspace { margin-top: 2em !important; }";

Releas Notes

  • 2006-01-29, Initial version

See also

Contributors

  • floozy

Comments

See discussion at OverrideCSS-Talk

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.