1. Home
  2. Computing & Technology
  3. Web Design / HTML

Staying out of TRouBLe with CSS
Trick to Remembering Shorthand Orders for margin, padding, and border

By , About.com Guide

Many CSS properties define the top right bottom and left sides of an element. In order to use the shorthand versions of these properties (for example: margin instead of margin-top, padding instead of padding-left), you need to have your numbers in a very specific order.

That order is:
top
right
bottom
left

An easy way to remember this is to think "TRouBLe". If you don't use this order you'll get in "TRouBLe".

Explore Web Design / HTML
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

©2009 About.com, a part of The New York Times Company.

All rights reserved.