1. Computing & Technology

Discuss in my forum

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.

©2012 About.com. All rights reserved.

A part of The New York Times Company.