Friday 29th of May 2015 10:11:03 PM

Nice and Free CSS Templates

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

The description of offsetting the outer edges is based on an erratum.The original CSS2 specification actuallysays that the content edges are offset, but it has been widely agreedthat this is a serious error, and in fact, readings of other parts ofthe specification show that it is the outer edges that are offset.

The implication of offsetting the outer edges of a positioned elementis that everything about an element -- margins, borders, padding,and content -- is moved in the process of positioning the element. Menu und content

Menu fixed, content

Menu und content

3 columns all

4 columns all

Menu floating

Menu fix, Inhalt u.
Head dynamic

3 columns fix

dynamic mit
Head und Footer

fixed BOX centered

dynamic BOX

fixed Box total
background-attachment: fixed;}
Figure 6-57

Figure 6-57. Perfect alignment of backgrounds

How is this perfect alignment possible? Remember, when a background is fixed , the origin element is positioned with respect to the canvas. Thus, both background patterns begin tiling from the top left corner of the document, not the individual elements. For the BODY, we can see the entire repeat pattern. For the H1, however, the only place we can see its background is in the padding and content of the H1 itself. Since both background images are the positioned element, however, is not offset from the right edge of the containing block, so the two are coincident. Similar reasoning holds true for the top and bottom of the positioned element: the outer top edge is placed halfway down the containing block, but the outer bottom edge is not moved up from the bottom. This leads to what's shown in Figure 9-2.


What's depicted in Figure 9-2, and in most of the examples in this chapter, will only work if the containing block