Remember TRBL

This post (like many I write) is mainly for myself.

When using CSS padding or margin, I generally will write margin-top, margin-bottom, margin-left, etc. I know there is easier syntax where I can specify all for with one line such as

margin: 0 10px 88px 10px;

The problem is, I can never remember which one is where. Know I’m not going to forget. It’s simply top, right, bottom, left… TRBL, TRouBLe, trouble. Who can forget trouble?

Sometime I want the top and bottom the same and the left and right the same. It is also a one liner:

margin: 10px 20px; /* top-bottom, right-left */

No, I’m not going to remember TBRL, that would be stupid. I’ll just remember to start at Top. See, no TRouBLe at all!

Related posts:

  1. One Liner to Decompress tar.gz Files For some reason I can never seem to remember this...

Related posts brought to you by Yet Another Related Posts Plugin.

June 19, 2008   Posted in: Yada

One Response

  1. Dentist Beverly Hills - July 2, 2008

    I can’t recall how many times I’ve neglected to use the margin attribute – for the same reason you mentioned – it’s a chore trying to remember what is what. I’m trying to get in the habit of using it now, as it can save you a considerable amount of time.

Comments are closed for this entry.