|
|
Use css shothand property to avoid more lines of code - CSS
|
Views : 769
|
|
Tagged in : CSS
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
CSS font shorthand rule
Normally we are styling font with CSS like the example below:
font-weight: bold;
font-style: italic;
font-variant: small-caps;
font-size: 1em;
line-height: 1.5em;
font-family: verdana,sans-serif
But no need of these much as lines, we can simply use CSS shorthand property,
font: bold italic small-caps 1em/1.5em verdana,sans-serif
Just a few of words of warning: This CSS shorthand version will only work if you're specifying both the font-size and the font-family. The font-family command must always be at the very end of this shorthand command, and font-size must come directly before this. Also, if you don't specify the font-weight, font-style, or font-variant then these values will automatically default to a value of normal, so do bear this in mind too.
|
|
By - ArulKumar, On - 2008-11-04 |
|
|
|