10 May 2009
Memory, Man!
“A Handy Nemonic for the CSS Box Model”

Being the retarded thicko I am, I can never remember the correct order that the four ‘sides’ come in, when writing CSS shorthand. For example, instead of writing:

.whatever
{
padding-top: 10px;
padding-right: 5px;
padding-bottom: 2px;
padding-left: 0px;
}

The smart cookie CSS coder, does it with the following shorthand:

.whatever
{
padding: 10px 5px 2px 0px;
}

My terminal inability to remember the order for the shorthand version is annoying enough when writing my own code, as I have to write the CSS out in full each time, but even more irritating when customising existing CSS code, coz I have to tweak each value in turn and then reload the page to see which was the ‘top’, which was the ‘left’ etc.

But suddenly today I have had an insight of the kind not seen since Archimedes realised the amount of water splashing on the floor beside his bath was exactly the same as the volume of foetid air emerging from his Grecian quack-hole; I have come up with a brilliant nemonic and the answer was staring me in the fecking face the whole time!

because…​

I have TRBL [ie. trouble] remembering the correct order.

Fucking brilliant eh?

Meta

TAGS: codingnemonicmemorycss

ORIGINAL PUBLICATION DATE: 10 May 2009

AUTHOR: stíobhart matulevicz

LAST MODIFIED: 09 May 2020  — REASON: "fix some leftover code block fuckups"

Back to Top