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

height

By Jennifer Kyrnin, About.com

height Description:

The height property defines the height of the element.

height in CSS Versions:

height Syntax:

height: <length> | <percentage> | auto | inherit

  • length
    A specific length (include unit of measure).
  • percentage
    A percentage of the height of the parent element.
  • auto
    Allows the user-agent to define the height based on inheritance and pre-set user-agent rules.
  • inherit
    The element should have the same height setting as the parent.

height Initial Value:

auto

height Applies To:

All block-level and replaced elements.

height Inheritance:

This property is not inherited.

height Browser Support:

height Examples:

Standard height property

<p style="height : 500px;">
This paragraph is 500px tall.
</p>

height Special Notes:

  • Negative values are not allowed.
  • When used for replaced elements, the height will be enforced by scaling the element.

More height Information:

Return to the Style Library

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. CSS
  5. Style Properties
  6. CSS Style Property: height

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

All rights reserved.