Each element has a natural location in a page's flow. Moving the element with respect to this original location is called relative positioning. The surrounding elements are not affectedat all. Figure 11.25. Although the date is aligned to the right, it is on a separate line than the header element and thus appears below it.
To offset elements within the natural flow:
Figure 11.26. Remember to both specify the relative positioning and also give the offset. Using ems will keep the offset in proportion with the size of the text.
Figure 11.27. By applying a negative offset to the date, we push it up into the preceding block's space. In this case, that results in the date being aligned with the section title. The succeeding elements are not affected at all.
Tips
Figure 11.29. Notice how the description (that begins with capturing) is now offset to the right under photobarcelona.
|