George Filippakos
George Filippakos

Reputation: 16569

Table td width Firefox

I am trying to set the width of a TD to 50% in Firefox.

IE works fine.

table.tablelist 
{
    width: 100%;
    border-collapse: collapse;
    display: block;
}
.tablelist tr
{
    border-bottom: 1px solid black;
}
.tablelist td
{
    width: 50%;
}



<table class="tablelist">
<tbody>
<tr>
    <td>
        African
    </td>
    <td>
        Jungle
    </td>
</tr>
</tbody>
</table>

Firefox seems to ignore the width of the TD when set to a percentage value.

if I set the width to 200px then it will work fine.

What am I missing?

Upvotes: 2

Views: 5931

Answers (2)

baduga
baduga

Reputation: 233

Try "min-width" instead of "width".

Upvotes: 0

Gurvinder
Gurvinder

Reputation: 790

Remove display: block; from table.tablelist

Upvotes: 4

Related Questions