HTML and CSS Reference
In-Depth Information
Figure 9-1 The Cool Shoes & Socks page as it was at the end of Chapter 7.
Assume you have a page with two paragraphs of content (whether they are on a web page or a word processing doc-
ument, which also has a normal flow). When you add a new paragraph in between the other two, the second para-
graph is pushed down to accommodate the new paragraph. This happens because the document has a normal flow
and elements are positioned relative to each other.
Using CSS, you are able to take an element “out of flow,” using the position: absolute; declaration. When
you do this, an element no longer affects or is affected by the elements around it. This capability has an endless num-
ber of uses, and when an element doesn't need to be in flow, it allows for greater control over the position of that ele-
The beauty of this capability is that a containing element can be in flow but its child elements can be out of
flow—useful for web page features such as drop-down menus (shown in Figure 9-2), which you add to the page later
in this chapter.
The normal flow and absolute position are types of positioning schemes that affect the document's flow. Float is an-
other form of positioning scheme, which essentially is a hybrid of normal flow and absolute positioning. Floats are
Search WWH ::

Custom Search