Aims:
font-family property but give it multiple values (a font stack)
to cover multiple platforms, e.g.:
body
{
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
@font-face rule
@font-face
{
font-family: MuseoSans;
src: url('fonts/museo_sans.otf') format( "opentype" );
}
h1
{
font-family: MuseoSans, Arial, sans-serif;
}
museo_sans.otf file and then uses it (in this case, for h1s)
font-size property, e.g.:
body
{
font-size: 11px;
}
body
{
font-size: 2em; /* or 200% */
}
h1
{
font-size: 1.5em; /* or 150% */
}
h1?
font-size of the body and everything else will change in proportion
ul
{
font-weight: bold;
}
ul
{
font-style : italic;
}
width and height
header, nav, section, aside, figure, figcaption, div, p, h1, h2, h3, h4, h5, h6,…
{
display: block;
}
em, i, strong, b, a, img, ...
{
display: inline;
}
display property, we can
li) to inline
a and
img) to block-level
img
{
display: block;
}
But in this case there's another way to mark this up to achieve the same effect now. What is it?
text-align to centre text, images (and other elements that have inline display role) that
are within a container element such as p, td, etc. e.g.:
p
{
text-align: center;
}
p
{
margin-right: auto;
margin-left: auto;
width: 760px;
}