CSS (Cascading Style Sheet) 10
CSS (Cascading Style Sheet) 10
(CASCADING
STYLE SHEET)
SAQIB SARWAR
by Techsol Media JLT Dubai
CSS FONT PROPERTIES
• Font-size
• Font-family
• Font-weight
• Font-style
• Font-variant
• Line-height
Pixel
FONT SIZE Font-Size: 15px;
Em
• Xx-smal
Font-Size: 1em;
• X-small -----------------------
• Small body{
• Smaller font-
size:24px;
• Medium }
• Large
• X-large #box1{
// font-size:50%;
• Xx-large // font-size: will take 50% of it
1em; will take 100% of
// font-size: will double of its P
2em;
FONT FAMILY
Font-family:arial;
Font-weight: bolder //works and lttle more bold from from parent
body{font-weight: 600 }
#box1{
font-weight:bolder parent is 600 it will do approx. 800
Font-weight:lighter parent is 600 it will do approx. 400
}
FONT STYLE
Font-style:italic
Font-style:oblique;
Font-style:normal //default value
naVerdaFontHeveticalvarialefamilyHel
naVerdaFontHeveticalnaVerdaFontHeveticalvarial
efamilyHelnaVerdaFontHeveticalvarialefamilyHel
Line height is a space
FoarintalfamilyFoarintalfamilynaVerdaFontHeveti
between lines in a
paragraph
calvarialefamilyHelFoarintalfamilyvarialefamilyH
elFoarintalfamilyFoarintalfamilynaVerdaFontHeve
EM
*Remember “em” works in compound
lets check how,
#box1 span{
font-size:2em;
}
<div id=“box1”>erdHeveerdHeve
<span>naVerdHeve<span>ticaFontvarial</span>elaintalfamily</span>
familyHelFoarintalfamily
</div>
SHORTHAND FONT PROPERTY
For all,
Font: oblique small-caps 600 1rem/25px
arial,verdana;
Font-style Font-weight line-height
Font-variant Font-size font-family
Shorthand
Tex-decoration:2px underline red wavy;
WORD-WRAP AND WORD-BREAK
Issue is Overflow
h-offset color
x-axis v-
blu
offset
r
y-axis
COLUMN-COUNT
Introduced in CSS3
very useful property
PROBLEM
I would like to show this paragraph in more interesting way such as in News
paper
SOLUTION
COLUMN-COUNT EXAMPLES
https://fonts.google.com/