webmonkey

 

padding

Page history last edited by winisha 2 yrs ago

Description

 

Padding is defined as the space between the element border and the element content.

 

Attributes

 

Padding-Top

Padding-Bottom

Padding-Left

Padding-Right

 

Padding Shortcuts

div { padding:25px; }

Applies a 25px padding to all sides of the div.

 

div { padding:20px 30px 20px 30px; }

Applies padding starting at the top in a clockwise direction.

Padding-Top:20px

Padding-Right:30px

Padding-Bottom:20px

Padding-Left:30px

 

Examples

 

.p { padding-left: 5px; padding-right: 10px;}

<div id="p"> Hi my Name is Winisha</div>

 

This is how the div will look:

 

 

My name is Winisha Smith

 

Here is another example:

.p1{ padding:10px;}

 

HELLO

 

Sources

 

http://www.tizag.com/cssT/reference.php

http://www.1keydata.com/css-tutorial/padding.php

Comments (0)

You don't have permission to comment on this page.