• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16.  Layout with Styles > Positioning Elements Absolutely

Positioning Elements Absolutely

The elements in your Web page generally flow in the order in which they appear. That is, if the IMG tag comes before the P, the image appears before the paragraph. This is called the normal flow. You can take elements out of the normal flow—and position them absolutely—by specifying their precise position with respect to their parent element.

To absolutely position elements:

1.
Type position:absolute; (don't forget the semicolon).

2.
Type top, right, bottom, or left.

3.
Type : v, where v is the desired distance that you want to offset the element from its parent element, either expressed as an absolute or relative value (10pt, or 2em, for example), or as a percentage of the parent element.

4.
If desired, type ; (semicolon) and repeat steps 2 and 3 for additional directions.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint