CSS Classroom – TRouBLe To Remember Shorthand OrderBy
Remember when you were a kid and had to memorize things for school? It was always easier if you had a mnemonic like “Never Eat Soggy Waffles” (for the compass) to help you remember.
Last week one of my clients asked, “How do you know what the numbers in CSS shorthand refer to – meaning which number do I change to get more padding on the right of my image or which number to I change to lessen the margin above an element?”
The numbers refer to Top, Right, Bottom and Left. If you have trouble remembering that they are listed (and applied) in a clockwise fashion around and element, then think of TRouBLe.
Hopefully that will help make things a bit easier to visualize next time you are looking at your website’s CSS file!
If you have a CSS, WordPress or Web Tools question you want answered, let me know in the comments and I’ll do my best to address it in a future post.