Log In · Register

 
tables and cell padding
*mona lisa*
post 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; }
 
 
Start new topic
Replies
*mipadi*
post 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).
 

Posts in this topic
mona lisa   tables and cell padding   Dec 18 2006, 12:02 AM
mipadi   Just use the "padding" attribute in cell...   Dec 18 2006, 11:11 AM
mona lisa   Wow. That was so simple. But it worked! Thank...   Dec 19 2006, 11:23 PM


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: