Jump to content
Killersites Forums

Shorthand properties question


the.shadw.dragn
 Share

Recommended Posts

For writing font properties the order is:

 

style variant weight size family

 

The order of style, variant, & weight is not critical, but it must end with size then family.

 

 

For margins, padding, borders the order is:

 

When using 4 values: top, right, bottom, left

 

When using 3 values: top, left & right, bottom

 

When using 2 values: top & bottom, left & right

 

1 value will apply to all 4 sides

 

 

For background properties the only thing that matters as far as order is the left and right position. The first value is the left position and the second value is the top position. If only one value is declared for position then the 2nd value defaults to center.

Link to comment
Share on other sites

I always had trouble with the 3 values - could never remember what's what - until I looked at it this way:

 

My top and bottom may be of 2 different sizes, but the girls (better) be about the same size. I know this is very corny, but it's worked for me, and now I know what the 3 values stand for. But please, feel free to use whomever's girls you want for this equation.

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...
 Share

×
×
  • Create New...