1. Computing

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.

  1. About.com
  2. Computing
  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

©2013 About.com. All rights reserved.