How can I apply !important to the following syle:
font-family: "Trebuchet MS" , Verdana, Helvetica, Sans-Serif;
I've tried this, but doesn't work:
font-family: "Trebuchet MS" , Verdana, Helvetica, Sans-Serif !important;
Start with the font you want, and always end with a generic family, to let the browser pick a similar font in the generic family, if no other fonts are available. Note: Separate each value with a comma. Note: If a font name contains white-space, it must be quoted.
Font Families: Serif, Sans-serif, and others In CSS (and in typography in general) there are five basic types, or families, of fonts: serif, sans serif, cursive, fantasy, and monospace. Serif fonts have small lines or strokes that extend from the ends of characters.
Not all browsers support all the fonts. So, giving multiple font families select the font that is supported by the browser, starting from the first font. If first font is supported then it is used, otherwise it checks if next font is supported and so on.
Select the children within the parent container with a wildcard (*):
div * {font-family: "Trebuchet MS" , Verdana, Helvetica, Sans-Serif !important; }
http://jsfiddle.net/4d3K4/50/
The code is fine. It would vary depending on which elements you are giving the property to. It's better if you use specific selectors such as classes:
http://jsfiddle.net/4d3K4/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With