Saturday 22nd of November 2008 07:34:51 AM

Nice and Free CSS Templates

class="initial" to the first paragraph tag. Thedeclaration of text-indent:0;overrides previously declared values, aslong as this block of declarations comes later in the style sheet.They're also more specific than the other styles we'reusing, due to the presence of a class selector, so that also helpsthese rules win out. The values for :first-letterwill cause the first letter of the initial paragraph to be twicenormal size, and floated left, as shown in Figure 11-13.

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
rule, where the amount by which paragraphs overlap each other and spill beyond the browser window is entirely dependent on the width of the window itself -- and the wider the window, the worse the situation becomes.

Figure 7-20

Figure 7-20. The dangers of document-wide negative-margin rules

Using negative margins with block-level elements such as these can quite obviously be dangerous and is rarely worth the trouble -- but it can also be rewarding. It takes a good deal add a background color, as shown in Figure 7-58:

H1 {padding: 10px 0.25em 3ex 3cm; background: silver;}
H2 {padding: 0.5em 2em; background: silver;}
Figure 7-58

Figure 7-58. Uneven padding with background colors

As Figure 7-58 demonstrates, the background of an element extends into the padding. As we discussed before, it also extends to the outer edge of the border, but the background has to go through the padding before it even gets to the border. Let's say that you want to center a background image within its element by using percentage values. That's easy enough:

BODY {background-image: url(bigyinyang.gif);
background-repeat: no-repeat;
background-position: 50% 50%;}

This causes the background image to be placed such that its center is aligned with the center of its parent element, as demonstrated in Figure 6-39. In other words, the percentage values apply to both the element and the background image. words, the value has to exist in order for normal, nonfloatingbehavior to be possible; without it, all elements would float in oneway or another.

Second, it's possible that you might want to override a certainstyle from an imported style sheet. Imagine thatyou're using a server-wide style sheet that floats images. Onone particular page, you don't want those images to float.Rather than writing a whole new style sheet, you could simply placeIMG {float: browser should ignore the text because it isn't part of theBODY element, but this is never the case.) Thisproblem is illustrated in Figure 1-5.

Figure 1-5

Figure 1-5. Older browsers will literally display your style sheets

In order to combat thisproblem, it is recommended that you enclose your declarations in acomment tag. In the examplegiven here, the beginning of the comment tag appears right after theopening STYLE tag, and the end of the comment