tonyagirl
04-07-2011, 10:53 PM
Hi, my CSS code is not having any effect on my table's column widths and I can't figure out why..
I want the whole table to be 494px long. I tried
width: 148px 49px 100px 148px 49px;
and
width: 30% 10% 20% 30% 10%;
with and without width: 494px or 100% in the table.jdmprices.... So I don't know what's up!
Here is my code without any cell width specification:
<style type="text/css">
table.jdmprices {
clear: both;
margin: 10px auto;
border-collapse: collapse;
font-size: 1.1em;
}
table.jdmprices th {
font-size: 1.5em;
text-align: left;
clear: left;
line-height: 150%;
padding: 2px 4px;
color: #24355E;
}
table.jdmprices th.header2 {
padding: 2px 15px;
text-transform: uppercase;
text-align: left;
font-size: 1em;
color: #000;
background-color: #FFFF80;
}
table.jdmprices td {
padding: 2px 4px;
text-align: left;
}
table.jdmprices tr.alt {
background-color: #F3F3F3;
}
</style>
<table class="jdmprices" border="1">
<tr>
<th colspan="5">Header</th>
</tr>
<tr>
<th colspan="5" class="header2">description</th>
</tr>
<tr>
<td colspan="5">Product</td>
</tr>
<tr>
<td>size</td>
<td>$price</td>
<td></td>
<td>size</td>
<td>$price</td>
</tr>
</table>
I want the whole table to be 494px long. I tried
width: 148px 49px 100px 148px 49px;
and
width: 30% 10% 20% 30% 10%;
with and without width: 494px or 100% in the table.jdmprices.... So I don't know what's up!
Here is my code without any cell width specification:
<style type="text/css">
table.jdmprices {
clear: both;
margin: 10px auto;
border-collapse: collapse;
font-size: 1.1em;
}
table.jdmprices th {
font-size: 1.5em;
text-align: left;
clear: left;
line-height: 150%;
padding: 2px 4px;
color: #24355E;
}
table.jdmprices th.header2 {
padding: 2px 15px;
text-transform: uppercase;
text-align: left;
font-size: 1em;
color: #000;
background-color: #FFFF80;
}
table.jdmprices td {
padding: 2px 4px;
text-align: left;
}
table.jdmprices tr.alt {
background-color: #F3F3F3;
}
</style>
<table class="jdmprices" border="1">
<tr>
<th colspan="5">Header</th>
</tr>
<tr>
<th colspan="5" class="header2">description</th>
</tr>
<tr>
<td colspan="5">Product</td>
</tr>
<tr>
<td>size</td>
<td>$price</td>
<td></td>
<td>size</td>
<td>$price</td>
</tr>
</table>