Using Fixed and Dynamic columns in a table?
Hello everyone,
II would like to have a HTML table with 6 columns. The Table width is 1500. The last 2 columns I want fixed at 150px. The remaining columns I want no formatting. I don't want any of the rows to wrap text if the content gets too large.
How do i code this correctly in HTML?
Re: Using Fixed and Dynamic columns in a table?
Set the last 2 <td> cells to be 150px and make sure the white-space with your preferred property.
Re: Using Fixed and Dynamic columns in a table?
I doubt you can do what you want, tables are notoriously known for not respecting things like overflow.
The whole point about tables is that they auto adjust to accommodate various content, and trying to defeat that typically won't work.
what would work, but it may not suit your need, is stick a div inside the td. That div needs to have a fixed width (not a %), overflow:hidden and white-space:nowrap.