|
CSS Tutorials |
CSS TutorialsWelcome 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. |
For Beginners...Introduction to CSS CSS Units For Intermediate Users...Controlling Background Images and Colours Controlling Fonts with CSS Controlling Text Appearance with CSS Making Lists Look Nicer with CSS For Advanced Users...CSS Positioning |
background-color
The background is the area of the content box and the padding and is always behind the foreground of the element. Therefore, the declared background color is applied to both the element's content box and its padding, as illustrated in Figure 6-14: different sizes. Thus you might see something like the following,shown in Figure 5-29:
H1 {font-variant: small-caps;}P {font-variant: normal;}<H1>The Uses of font-variant</H1><P>The property <CODE>font-variant</CODE> is very interesting...</P>Figure 5-29. Small caps in use
specification says only that each number corresponds to a weight atleast as heavy as the number that precedes it. Thus,100, 200,300, and 400 might all map tothe same relatively lightweight variant, while 500and 600 could correspond to the same heavier fontvariant, and 700, 800, and900 could all produce the same very heavy fontvariant. As long as no keyword corresponds to a variant that islighter than the variant assigned to the previous keyword, then line in the element, if the situation seems to demand it. Forexample, a grooved border might look better enclosed on each lineend, as shown in Figure 7-55.Figure 7-55. An inline element with a border displayed across multiple lines of text, with the border boxes closed
It's also acceptable for the lines to be "open" asshown in Figure 7-54.
WARNING
Borders cannot be applied to inline elements in