May 03, 2021 CSS
The CSS Dimension property allows you to control the height and width of an element. Again, it allows you to increase line spacing.
Sets the height of the element
This example shows how to set the height of different elements.
Use percentages to set the height of the image
This example shows how to set the height of an element using a percentage value.
Use pixel values to set the width of an element
This example shows how to use pixel values to set the width of an element.
Sets the maximum height of the element
This example shows how to set the maximum height of an element.
Use percentages to set the maximum width of an element
This example shows how to use a percentage value to set the maximum width of an element.
Sets the minimum height of the element
This example shows how to set the minimum height of an element.
Use pixel values to set the minimum width of an element
This example shows how to use pixel values to set the minimum width of an element.
Property | Describe |
---|---|
height | Sets the height of the element. |
line-height | Set the row height. |
max-height | Sets the maximum height of the element. |
max-width | Sets the maximum width of the element. |
min-height | Sets the minimum height of the element. |
min-width | Sets the minimum width of the element. |
width | Sets the width of the element. |