13.07.2015 Views

Beginning CSS: Cascading Style Sheets for Web Design, 2nd ...

Beginning CSS: Cascading Style Sheets for Web Design, 2nd ...

Beginning CSS: Cascading Style Sheets for Web Design, 2nd ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Relative PositioningChapter 11: PositioningRelative positioning is very similar to static positioning; elements to which relative positioning isapplied do not leave the document flow. There are three differences between relative positioning andstatic positioning:1. Elements with a relative position can be used as a point of reference <strong>for</strong> elements nested withinthem that are absolutely positioned.2. The position of a relatively positioned element can be adjusted using the offset properties.3. A relatively positioned element can have a position on the (invisible) z-axis (more on this laterin this chapter).To observe how a relatively positioned element can be used as a point of reference <strong>for</strong> absolutely positioneddescendant elements, take a look at Figure 11-5.As always, the <strong>CSS</strong> in Figure 11-5a is combined with the markup in Figure 11-5b to produce the outputthat you see in Figure 11-5c.Figure 11-5a381

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!