Thursday 28th of August 2008 08:07:57 PM

Nice and Free CSS Templates

6.1.2. Background Color

In a fashion very similar to setting the foreground color, it's possible to declare a color for the background of an element. For this, you use the property background-color, which accepts (unsurprisingly) any valid color.

This site contains free css templates for your website - Just copy and paste and there you have a stunning website !

Menu und content
dynamic

Menu fixed, content
dynamic

Menu und content
dynamic

3 columns all
dynamic

4 columns all
dynamic

Menu floating

Menu fix, Inhalt u.
Head dynamic

3 columns fix
centered

dynamic mit
Head und Footer

fixed BOX centered

dynamic BOX
centered

fixed Box total
centered
of the textual (and other) content.

In CSS, it is possible to set an explicit height on any block-levelelement. If this is done, the resulting behavior is somewhatuncertain. Assume that the specified height is greater than thatneeded to display the content:

<P STYLE="height: 10em;">

In this case, then the extra height is treated somewhat like extrapadding, as depicted in Figure 8-3.and are next to each other in the document tree. For example:

H2 + P {color: silver;}

In the first set of markup, a paragraph immediately follows an H2, so it is silver. In the second, the element adjacent to the H2 is a UL, which does not match the rule, and neither does the paragraph right after that. Finally, even though there is text directly after the third H2, it isn't part of an element, so the paragraph right after the text matches the rule and is colored