I can not get the CSS styles, margin-left:auto and margin-right: auto, to center the table itself with IE 6. With no other changes but substituting equal percentages for the values auto, the table is centered.
I can also center the table using the 'center' tag in the XHTML document. However, I want to totally separate content from presentation.
Can anybody tell me what is wrong with the following CSS style rules?
table {
width=65%;
margin-left: auto; margin-right: auto;
}
td {
text-align:center;
}
The relevant XHTML code follows:
<table summary="This table is my fee schedule re round trip mileage and number of items served.">
<caption>CURRENT FEE SCHEDULE</caption>
<tr>
<th id="header1">Round Trip </th>
<th id="header2">1-2 Items</th>
<th id="header3">3-4 Items</th>
</tr>
<tr>
<td headers="header1">1-24 Miles</td>
<td headers="header2">$35.00</td>
<td headers="header3">$50.00</td>
</tr>
<tr>
<td headers="header1">25-49 Miles</td>
<td headers="header2">$50.00</td>
<td headers="header3">$65.00</td>
</tr>
</table>
Thanks in advance, Wordsmyth
I can also center the table using the 'center' tag in the XHTML document. However, I want to totally separate content from presentation.
Can anybody tell me what is wrong with the following CSS style rules?
table {
width=65%;
margin-left: auto; margin-right: auto;
}
td {
text-align:center;
}
The relevant XHTML code follows:
<table summary="This table is my fee schedule re round trip mileage and number of items served.">
<caption>CURRENT FEE SCHEDULE</caption>
<tr>
<th id="header1">Round Trip </th>
<th id="header2">1-2 Items</th>
<th id="header3">3-4 Items</th>
</tr>
<tr>
<td headers="header1">1-24 Miles</td>
<td headers="header2">$35.00</td>
<td headers="header3">$50.00</td>
</tr>
<tr>
<td headers="header1">25-49 Miles</td>
<td headers="header2">$50.00</td>
<td headers="header3">$65.00</td>
</tr>
</table>
Thanks in advance, Wordsmyth