Table width -
12-02-2007
, 08:44 PM
Hello,
I created a table, with 600px fixed width, with 3 columns.
The first column contains a checkbox so I am using a fixed with.
Second column should expand.
Third column has only one word so I decided to make it fixed width
giving it some margin.
The problem is that in IE 7 the first column, the one with the check
box, gets much wider then it should be.
What am I doing wrong?
And is there something I should to to improve the design of my table?
Here is my code:
<table id="ctl02_lvTags_tTags" class="Grid">
<thead>
<tr>
<th class="CheckBox"> </th>
<th>Tag</th>
<th class="Command"> </th>
</tr>
</thead>
<tfoot>
<tr>
<th colspan="2">Footer Left</th>
<th>Footer Right</th>
</tr>
</tfoot>
<tbody id="ctl02_lvTags_itemContainer">
<tr>
<td class="CheckBox">
<input id="cbActive1" name="cbActive1" disabled="disabled"
type="checkbox">
</td>
<td>
Tag 001
</td>
<td class="Command">
<a id="lbEdit1">Edit</a>
</td>
</tr>
<tr>
<td class="CheckBox">
<input id="cbActive2" name="cbActive2" disabled="disabled"
type="checkbox">
</td>
<td>
Tag 002
</td>
<td class="Command">
<a id="lbEdit2">Edit</a>
</td>
</tr>
</tbody>
</table>
..Grid
{
margin: 20px;
border-collapse: collapse;
color: #505050;
font-size: 70%;
width: 600px;
}
..Grid th.CheckBox
{
text-align: center;
width: 25px;
}
..Grid th.Command
{
width: 100px;
}
Thanks,
Miguel |