Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

CSS padding & margin order?

Similar Topics:

CSS Margin vs. Padding ?

Ads
banner
banner
banner
letsplay Offline referral

Posts: 274
Joined: Jul 2013
Reputation: 1

#1
Senior Member
Hi I am playing with css margin and padding properties but I am not sure about the order? Is the correct order:

Code:
Top, Right, Bottom, Left
Or
Code:
Left, Top, Right, Bottom

I mean some can anybody explain how CSS works????
invisibe_dude Offline referral

Posts: 820
Joined: May 2013
Reputation: 24

#2
Posting Freak
The correct margin and padding order is:

Code:
padding:1px 2px 3px 4px;
top padding is 1px
right padding is 2px
bottom padding is 3px
left padding is 4px

Code:
padding:1px 2px;
top and bottom padding is 1px;
right and left padding is 2px;

Code:
padding: 7px;
All 4 padding are 7px

Code:
margin:2px 3px 4px 5px;
top margin is 2px
right margin is 3px
bottom margin is 4px
left margin is 5px

Code:
margin:2px 3px;
top and bottom margin is 2px;
right and left margin is 3px;

Code:
margin: 5px;
All 4 margin are 5px

Off topic. For the border radius the correct order is, left-top, right-top, right-bottom, left-bottom.





User(s) browsing this thread: 1 Guest(s)