tables and cell padding |
![]() ![]() |
tables and cell padding |
| *mona lisa* |
Dec 18 2006, 12:02 AM
Post
#1
|
|
Guest |
Is there a way I can modify the cellpadding of a table using CSS? When I use the following, there is too much space from the top and bottom. Cellpadding apparently affects all four sides for each cell of the table.
CODE <table align="middle" width="716" height="500" background="images/template_middle.png" border="0" cellspacing="0" cellpadding="17"> I want to squish it as shown here: ![]() I have the whole thing in a table so that I can use an autostretching table with a repeating vertical background. I tried using CSS but it didn't exactly work out. CODE td.content {
font-family: Tahoma, Verdana, Sans-serif; font-size: 13px; color: #000000; cellpadding-left:11px; cellpadding-top:5px; cellpadding-right:11px; cellpadding-bottom:5px; } |
|
|
|
| *mipadi* |
Dec 18 2006, 11:11 AM
Post
#2
|
|
Guest |
Just use the "padding" attribute in cells. Something like this should work:
CODE TD {padding:5px 11px;} Of course, adjust it to your own CSS by adding other desired attributes and the correct CSS selector (.content in your example). |
|
|
|
| *mona lisa* |
Dec 19 2006, 11:23 PM
Post
#3
|
|
Guest |
Wow. That was so simple.
|
|
|
|
![]() ![]() |