Contact Us


FriendFeed FriendFeed


follow us on twitter Twitter


 Rss Feed


Favorites Add to Favorites

Tuesday, May 29, 2007

Margins and Padding

Margin and Padding are the two most commonly used properties for spacing-out elements. A margin is the space outside of the element, whereas padding is the space inside the element.


.cp_list {
font-size: 14px;
background-color: #ffc;
margin: 10px 0px 5px 20px;
padding: 3px;

In this example (margin: 10px 0px 5px 20px;) which say the browser to leave space as top 10px, right 0px, bottom 5px and left 20px... and for padding which will alocate space 3px in all aspects..

The four sides of an element can also be set individually. margin-top, margin-right, margin-bottom, margin-left, padding-top, padding-right, padding-bottom and padding-left


Blogger Idris said...

Hi harish... Update your blog regularly. One request, Plz change the link text as "How to start an internet business"

May 31, 2007 at 3:58:00 AM PDT  
Blogger ashok said...

Nice informative blog you got there we are into web designing and are in chennai please do drop us a line we can think about helping each other.

November 22, 2007 at 4:01:00 AM PST  
Blogger Ukion said...

I try it on my blog.
very good post. Are you interested for link exchange. add comment to my link exchange section.

Greetings my co-blogger

February 9, 2008 at 4:54:00 AM PST  
Blogger Thiru Moorthy said...

Thanks for your grateful informations, am working in Web Design Company in Bangalore

October 17, 2013 at 8:53:00 PM PDT  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home