Jump to content

Order of march


jegranet
 Share

Recommended Posts

Depends if you're using the shorthand. The shorthand syntax is:

padding: top right bottom left;

so this:

padding: 5px 4px 3px 8px;

would add 5px padding to the top, 4 to the right, 3 to the bottom, and 8 to the left.If there are three values:

padding: 2px 3px 4px;

it applies 2px to the top, 3 to left and right, and 4 to the bottom.Similarly, if there are only two values:

padding: 5px 8px;

it applies 5px to the top and bottom, and 8px to the left and right. If you are not using shorthand (ie, padding-left, padding-top, etc.) it does not matter what order they are in. Ie,

padding-top: 10px;padding-left: 4px;

is the same as:

padding-left: 4px;padding-top: 10px;

Edited by ShadowMage
Link to comment
Share on other sites

Depends if you're using the shorthand. The shorthand syntax is:
padding: top right left bottom;

The shorthand starts from the top and goes clockwise. That's top, right, bottom, left.
Link to comment
Share on other sites

The shorthand starts from the top and goes clockwise. That's top, right, bottom, left.
:lol:Yeah, that's what I meant. I had it right when I gave the example: :P
padding: 5px 4px 3px 8px;

would add 5px padding to the top, 4 to the right, 3 to the bottom, and 8 to the left.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...