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.
| Code | Result |
|---|---|
|
|
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.
| Code | Result |
|---|---|
|
|
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
| Code | Result |
|---|---|
|
|
This div has min-height and min-width applied.
|

