HTML and CSS Reference
In-Depth Information
Figure 9-10 The page title in its default static position.
In Figure 9-11, I gave the <h1> a top value of 30px . This value moved the page title 30px, relative to the top of its
normal position.
Note the only difference between Figure 9-10 and Figure 9-11 is the position of the text—the area taken up by the
<h1> element doesn't change. The flow of the document isn't affected because the page title's normal position re-
mains in flow and in the same position, so although the text is offset, the contents below aren't affected in any way.
When an element is position: relative; , top , left , right , and bottom offset that element relative to
the top, left, right, and bottom of the normal position, respectively.
Search WWH ::

Custom Search