Quackit Logo
HTML
CSS
Scripting
Database
Hosting
Design
XML

CSS Height and Width

CSS includes height and width properties to help you specify the size of your elements.

height and width Properties

Applies to all HTML elements except non-replaced inline elements, table columns and column groups.

Can use a fixed height (i.e. pixels) or a percentage height. For more info, see height and width.

CodeResult

This div has height and width applied.

max-height and max-width Properties

Enables you to constrain the height and/or width of an element to a maximum value. For more information, see max-height and max-width.

CodeResult

This div has max-height and max-width applied.

min-height and min-width Properties

Enables you to constrain the height and/or width of an element to a minimum value. For more info, see min-height and min-width

CodeResult

This div has min-height and min-width applied.

Enjoy this page?

  1. Link to this page (copy/paste into your own website or blog):
  2. Link to Quackit using one of these banner ads.

Thanks for supporting Quackit!

Sponsored Link: Design CODE-FREE Websites