Set the height of an element.

      height: height | inherit ;

height - the height in px, pt or em.
inherit - inherit from the parent element.

If a div contains more text than will fit within a limited height, then it will scroll below the bottom border.

h1 { height: 25px; }
.emw3class { height: 2em; }

#emw3id { height: 25pt; }

Try it:

This is a sample of text with a CSS border. The border helps to display the height of the DIV.

(CSS 1) Browser Support: All major browsers. IE versions up to and including 7 don’t support the value inherit.

“Happiness makes up in height what it lacks in length” ~ Robert Frost


max-height - Maximum height of an element.
- Minimum height of an element.
width - Width of an element.

Copyright © 2013-2022 Emw3.com
Some rights reserved