HTML and CSS Reference
In-Depth Information
p {
display: inline
}
p + p:before {
content: "\2761";
margin: 0 .5em;
}
Note Internet Explorer 7 and lower does not support CSS content generation. Most other modern
browsers, including Safari, Firefox, and Opera, do.
Setting Quotations
It is common practice in typography to set block quotations in italics, and this happens to be
the default styling for the blockquote (X)HTML element in most browsers. Still, we recommend
that you explicitly state this preference to ensure it is set:
blockquote {
font-style: italic;
}
Additionally, block quotes are sometimes set with a margin on both sides. This can be
accomplished using CSS as follows:
blockquote {
font-style: italic;
margin: 1em 3em;
}
Headings and Subheads
Setting headings and subheads is where web designers often find themselves especially frus-
trated with the lack of typeface selection available on the Web. For this reason, it has become
common to use CSS (and sometimes JavaScript or other scripting as well) to “replace” heading
text with images or even Flash files.
Header Margins
As with paragraphs, headers are given a default vertical margin of 1 em in most web browsers.
Many times, though, designers prefer headers to have less of a bottom margin—or maybe no
bottom margin at all—so that they sit directly atop the text to which they relate. Achieving this
is relatively simple:
h1, h2, h3, h4, h5, h6 {
margin-bottom: .2em;
}
Search WWH ::




Custom Search