Remembering the order of the CSS margin property
You give the style margins in the following order: top, right, bottom, left.
But I kept having trouble remembering this and had to keep looking it up. Until I thought of Charles Barkley. The order is what Charles would tell Kenny Smith about how the Warriors played against the Spurs:
"The Warriors played trbl, tonight, Kenny, just trbl."
But I kept having trouble remembering this and had to keep looking it up. Until I thought of Charles Barkley. The order is what Charles would tell Kenny Smith about how the Warriors played against the Spurs:
"The Warriors played trbl, tonight, Kenny, just trbl."
I always remember it as clockwise-from-top.
ReplyDeleteWhat I always forget is what order padding, borders, and margin are in. I always have to use trial-and-error to figure out whether it's margin or padding that's inside the border.
Hmm... I never really had a problem remembering that as it was logically clockwise.
ReplyDeleteIs this a persistent problem?
Also known as: clockwise.
ReplyDeleteYes, well, I don't often think of a paragraph of text as a clock.
DeleteDoes the order really matter? What happens if it isn't in order?
ReplyDeleteYou will set a different margin than you meant to set!
Delete