PDA

View Full Version : CSS table padding


InfiniteWebby
Sun 14th Dec '03, 1:30am
Is there a way I can apply padding to only one cell and also have different values for the top, left, right and bottom?

InfiniteWebby
Sun 14th Dec '03, 1:39am
nevermind im using padding: 10px 0px 0px 5px; but that seems to make my cell 5pixels higher and 10 pixels wider. Any fix?

LeeCHeSSS
Thu 18th Dec '03, 7:33am
"padding: 10px 0 0 5px;" will add a 10px wide padding to the top of your element and a 5px wide padding to the left of your element.

If you don't want to make your cell larger, you should use margin instead: "margin: 10px 0 0 5px;"

fred123
Tue 6th Jan '04, 3:44am
"padding: 10px 0 0 5px;" will add a 10px wide padding to the top of your element and a 5px wide padding to the left of your element.

If you don't want to make your cell larger, you should use margin instead: "margin: 10px 0 0 5px;"
Margin doesn't do anything when applied to cells.. padding will naturally make your cell bigger if the original demensions are too small to fit the content in it, or if no demensions are set.

I can give you the page i made to test this theory.