1. Home
  2. Computing & Technology
  3. Web Design / HTML

Box Elements and Block-Level Elements Are Key to XHTML Documents

By , About.com Guide

4 of 4

Adjust the Position of Box Elements

Box Properties

Box Properties

Image courtesy J Kyrnin
  • left
    This defines where the object's left side should lay on the document page. The default is 0 pixels from the left gutter.
  • right
    This defines where the object's right side should lay on the document page. The default is 0 pixels from the right gutter.
  • top
    This defines where the object's top side should come on the document page. Assuming relative positioning, the default is 0 pixels beneath the top gutter or preceding element.
  • bottom
    This defines where the object's bottom side should come on the document page. The default is 0 pixels above the bottom gutter or following element.

It is a good idea to define only the position of a top or bottom and one side. Trying to define all four positions will result in strange effects, especially if the width of the element conflicts.

Explore Web Design / HTML
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. HTML and XHTML
  5. XHTML
  6. HTML Tags
  7. Box Elements and Block Level Elements - Adjust the Position of Box Elements

©2009 About.com, a part of The New York Times Company.

All rights reserved.