Tuesday, November 22

How to Remember CSS Margins

I confessed to CDub that, while I'm quite handy with the 2- and 4-argument margin properties, I always get confused by the 3-argument one. Here's his helpful mnemonic:
The 4-argument CSS syntax of T(op), R(ight), B(ottom), L(eft) which I remember as Truman, Roosevelt, (Benjamin) Harrison, and Lincoln collapses in a 3-arg syntax to just T, R/L, B as you mentioned. The key for me is to use reverse chronological order of US presidents with memorable nicknames like "Four-eyes", "Teddy", "Kid Gloves", and "Honest Abe," respectively and that only Rushmore-worthy presidents are allowed to collapse together.