Thursday, October 27, 2016

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

6 comments:

  1. I always remember it as clockwise-from-top.

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

    ReplyDelete
  2. Hmm... I never really had a problem remembering that as it was logically clockwise.

    Is this a persistent problem?

    ReplyDelete
  3. Also known as: clockwise.

    ReplyDelete
    Replies
    1. Yes, well, I don't often think of a paragraph of text as a clock.

      Delete
  4. Does the order really matter? What happens if it isn't in order?

    ReplyDelete
    Replies
    1. You will set a different margin than you meant to set!

      Delete

Why so many died

"Tired of waiting for heaven — that is, for a condition where the transcendent would no more have to compromise with the immanent — th...