Exforsys

Home arrow Technical Training arrow CSS Tutorials

CSS Dimensions

Author : Exforsys Inc.     Published on: 17th Mar 2006    |   Last Updated on: 17th Apr 2006

CSS Dimensions

In this tutorial you will learn about Cascading Style Sheets (CSS) - Dimensions, Line height, Width and Height.

Ads

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



 
This tutorial is part of a CSS Tutorials tutorial series. Read it from the beginning and learn yourself.

CSS Tutorials

 

Comments