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

Positioning Elements

In CSS2, the position property enables you to position elements on the page. It takes the following values: static, absolute, relative, and fixed. The static value corresponds to the normal flow and is the default. The absolute value positions an element relative to the containing block. The relative value positions an element relative to its current position. The fixed value “fixes” an element's position relative to the browser window, so that it remains fixed when the page is scrolled. The fixed value is currently only supported by Opera 5 (with some bugs).

Using Absolute Positioning

The position: absolute property specifies that an element is to be positioned relative to the containing block. If the element is nested inside the BODY element, then the document body is the containing block. If it is nested inside some other element, that element is the containing block.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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