Reputation: 6432
I have a table like so:
<table id="MyTable" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th style="width: 30%;">
<asp:Literal ID="LitDescriptionTitle" runat="server" />
</th>
<th style="width: 30%;">
<asp:Literal ID="LitDescription2Title" runat="server" />
</th>
<th style="width: 30%;">
<asp:Literal ID="LitAddressTitle" runat="server" />
</th>
<th style="width: 10%;">
</th>
</tr>
</thead>
<tbody>
Now the column widths are set correctly to the percentages in IE, but not in firefox. (Probably FF doing something correctly)
Is there something I can do to get the widths of the columns to be fixed to the above percentages in both IE and FF?
Upvotes: 9
Views: 50948
Reputation: 12797
You've set the percentages to be percentages, but percentages of what?
Try setting the width of the table itself, either using style="width: x"
or in the CSS with:
table#MyTable {
width: x; // x denotes overall size
}
Upvotes: 2
Reputation: 21023
I can't replicate the percentages being correctly set in IE, FF or Chrome. To get the percentages set correctly you must set a width to the outlying table. Whether that is an absolute or relative value is up to you. But remember not to use inline styles.
Upvotes: 0