testndtv testndtv - 7 months ago 46
CSS Question

Issue with HTML <table> widths

I have a

with 3 columns as:

table {
border: 1px dashed goldenrod;
td {
border: 1px solid gray;

<td width="120">Some content</td>
<td width="150">Some content</td>
<td width="100%">Some content</td>

Now the 3rd column ise set to occupy the remaining width..But in my case, while it does stretch and occupy remaining width, it squeezes the first 2 columns...

If I do not give any width to the 3rd column/td, I am able to see the specified width for the first 2 columns..

Please help me.

The table has already been set with width="100%"


Leave the last column without width, and set table width to 100% or desired table width.