CSS Dimensions
In this tutorial you will learn about Cascading Style Sheets (CSS) – Dimensions, Line height, Width and Height.
The dimension properties enable you to increase or decrease the height and width of HTML elements.
Line height
To set the distance between the lines of an element, use the property “line-height”, the value of this attribute can be an absolute value or a percentage.
Example:
p
{
line-height: 0.3cm;
}
This sets the distance between lines to 0.3 cm.
Width:
To control the width of an element, you can use three properties, they are:
• “width”: sets the element width.
• “min-width”: sets the minimum width of an element.
• “max-width”: sets the maximum width of an element.
The value of these properties can be an absolute value or a percentage.
Example:
table
{
width: 100%
}
This sets the width of the