# top attribute

Type: | length
Inherited: | no
Used By: | All block elements
See: | height left position width

The distance to offset this block towards the bottom of the page.
Generally this will be left at zero, in which case (barring td elements) the top of the block is the bottom of the previous elements block plus it's bottom margin, padding and border. The value can be positive or negative to move the block down or up as required.
For absolutely positioned blocks, the top of the block is based around the top of it's parent block, not the bottom of it's previous sibling. For inline blocks this attribute is ignored

This places the inner DIV halfway down the outer DIV. A similar effect could be had by setting "vertical-align=bottom" instead.

    <div height="100">
      <div y="50%" height="50%">
        Halfway down the outer DIV
      </div>
    </div>