height
JavaScript syntax:
height
Values:
<length> | <percentage> | auto | inherit
Initial value:
auto
Applies to:
Block-level
Inherited:
No.
Percentages:
Calculated with respect to the height of the containing block.
Description:
This defines the height of an element's content area. This property is ignored for inline nonreplaced elements.
Examples:
<p>
<img id="myImg" src="http://java2s.com/Book/HTML-CSSImages/star.png" style="width: 74; height: 100">
</p>
<input type="button" value="Reduce height" onclick="myImg.style.height=50">
<input type="button" value="Restore height" onclick="myImg.style.height=100">
img.icon {height: 50px;}
h1 {height: 1.75em;}
Home
HTML CSS Book
CSS Reference
HTML CSS Book
CSS Reference
Property:
- background
- background-attachment
- background-color
- background-image
- background-position
- background-repeat
- border
- border-bottom
- border-bottom-color
- border-bottom-style
- border-bottom-width
- border-color
- border-left
- border-left-color
- border-left-style
- border-left-width
- border-right
- border-right-color
- border-right-style
- border-right-width
- border-style
- border-top
- border-top-color
- border-top-style
- border-top-width
- border-width
- bottom
- clear
- clip
- color
- content
- counter-increment
- counter-reset
- cursor
- direction
- display
- float
- font
- font-family
- font-size
- font-style
- font-variant
- font-weight
- height
- left
- letter-spacing
- line-height
- list-style
- list-style-image
- list-style-position
- list-style-type
- margin
- margin-bottom
- margin-left
- margin-right
- margin-top
- max-height
- max-width
- min-height
- min-width
- outline
- outline-color
- outline-style
- outline-width
- overflow
- padding
- padding-bottom
- padding-left
- padding-right
- padding-top
- position
- quotes
- right
- text-align
- text-decoration
- text-indent
- text-transform
- top
- unicode-bidi
- vertical-align
- visibility
- white-space
- width
- word-spacing
- z-index
Related: