Figure 7-11

Figure 7-11. Percentage margins and changing environments

As you can imagine, this leads to the possibility of "fluid" pages, where the margins and padding of elements enlarge or reduce to match the actual size of the display canvas. In theory, as the user changes the width of a browser window, the margins and padding will expand or shrink dynamically -- but not every browser supports this sort of behavior. Still, using percentages for margin and padding may be the best way to set styles that

Friday 03rd of September 2010 11:47:49 PM

centered

This area should be horizontally and vertically centered.
This text stays left aligned
ie mac doesn't like this!
more nice and free css templates


css

element there due to its earlier position in the document source, then the latter element is placed against the outer right edge of the previously floated element. If, however, a floated element's top is below the bottom of all earlier floated images, then it can float all the way to the inner left edge of the parent. Some examples of this are shown in Figure 8-31.

Figure 8-31

Figure 8-31. Keeping floats from overlapping

The advantage of this rule is that, since you don't have to worry about one floated element obscuring another, you can be assured700 (the numeric equivalent tobold). Since 800 is assigned tothe same font face as 700, there is no visibledifference between normal H1 text and boldfacedH1 text, but nonetheless the weights aredifferent.

In the last example, paragraphs are set to be the lightest possiblefont weight, which we assume exists as a Light variant. Furthermore,the other faces in this font family are Regular and Bold. Any