1

Working on my own I tought I need to learn that css3 shorthand properties, because - as I know now, it affects website's loading time, so I need to optimize it a little bit. I was thinking - is there any order how to write property values, when using shorthand prop's? For example: font: 1em/1.5em bold italic serif

  • 2
    When you are done with your CSS, why not just compress/optimize it, for example with devilo.us ? – Jalayn Apr 19 '13 at 12:49
  • 1
    Sharing your research helps everyone. Tell us what you've tried and why it didn’t meet your needs. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer. Also see How to Ask – gnat Apr 19 '13 at 13:07
3

With such shorthands, there's no order. On shorthands where you provide all numeric values (margin, padding, ...), the order is important :

  • 4 values : applied in that order : top right bottom left
  • 3 values : top right+left bottom
  • 2 values : top+bottom left+right
  • 1 value : top+bottom+left+right

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.