Jump to content

Order of march


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 post
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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...