Welcome to the CSS Tutorials. In this section we cover Cascading Style Sheets, the powerful supplement to HTML that allows you complete control over the look of your websites. We'll show you how to create Cascading Style Sheets, and some of the cool tricks you can achieve with them.
Introduction to CSS
For Intermediate Users...
Controlling Background Images and Colours
Controlling Fonts with CSS
Correctly implemented user agents will collapse the vertically adjacent margins, as shown in the first list in Figure 7-16, where there are 15-pixel spaces between each list item. The second list shows what would happen if the user agent didn't collapse margins, resulting in 25-pixel spaces between list items.
Controlling Text Appearance with CSS
Making Lists Look Nicer with CSS
For Advanced Users...
It's also possible to set the top and bottom margins of a block-level element to be auto. If either of these properties is set to auto, it is reset to 0 (zero), effectively removing any top or bottom margin from the element box, as shown in Figure 8-5. The lack of any space between the borders of each paragraph is a result of auto being calculate the width, or the height, or both.
Incidentally, the result, shown in Figure 6-37,would have been exactly the same had the position been declared asright top. When using theposition keywords, they can appear in any order, so long as there areno more than two of them, one for the horizontal and the other forthe vertical.
If only one keyword appears, then the other is assumed to becenter. Table 6-1 shows
Of course, the one thing that almost every beginning web author wants to know is, "How do I set colors on my web page?" Under HTML, there were two choices: use one of a small number of colors with names, like red or purple, or employ a vaguely cryptic method using hexadecimal codes. Well, both of those methods for describing colors can be found in CSS, as