Padding is the distance between the border of an (X)HTML element and the content within it.
Most of the rules for margins also apply to padding, except there is no “auto” value, and negative values cannot be declared for padding.
padding-top: length percentage;
padding-left: length percentage;
padding-right: length percentage;
padding-bottom: length percentage;
As you can also see in the above example you have 2 choices of values for the padding property
You can also declare all the padding of an element in a single property as follows: Read more…
In this tutorial you will learn about Cascading Style Sheets (CSS) Padding,
The padding is the space between the element border and the element content from the four sides, the padding attributes enables you to increase or decrease this space; unlike spacing padding space values can’t be negative.
To declare the padding you can use the following properties:
padding-top, padding-right, padding-bottom, and/or padding-left.
The values of these properties can be an absolute length, a percentage.
table
{
padding-top: 5px;
padding -right:3px;
padding -bottom: 5px;
padding -left: 2px;
}
home |
about | submit a site | tags | site map | contact us | rss
© CSS Examples 2008, All rights Reserved.

