[thelist] TIP: TD Padding

Tim Beadle tim.beadle at iop.org
Wed Aug 4 02:42:25 CDT 2004


On Tue, 2004-08-03 at 22:24, Casey Crookston wrote:
> <td
> style="padding-left:10px;padding-top:15;padding-right:10px;padding-bottom:15
> px ">

Just a couple of points:

* Any non-zero size *must* have a unit, e.g. px, em, pt, % etc.
* You could shorthand your style to padding: 15px 10px 15px 10px -
remember the mnemonic: TRouBLe: Top, Right, Bottom, Left.
* If your top/bottom and left/right are the same (as they are here), you
can shorthand further to padding: 15px 10px (top/bottom, left/right).
* As others have mentioned, putting this in an external style sheet will
increase maintainability and efficiency of bandwidth usage.

Looky here for an article about Writing Efficient CSS:
http://www.positioniseverything.net/articles/efficientcss.html

More from Uncle Google:
http://www.google.com/search?q=writing+efficient+css&sourceid=firefox&start=0&start=0&ie=utf-8&oe=utf-8

Regards,

Tim
-- 
Tim Beadle <tim.beadle at iop.org>


More information about the thelist mailing list