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


Page Information

  • 10 months ago [history]
  • View page source
  • You're not logged in
  • No tags yet learn more

Wiki Information

Recent PBwiki Blog Posts