Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello,
I'm having the same problem as the one described here:
http://www.computing.net/webdevel/w...
The problem is that this setting:
<th style="width:300px;">This is the header<th>
works ONLY if the table width is less than the width of the screen. If I add several columns, the settings do not take effect, and the columns width size themselves.
The link shown above describes a previous solution setting the whole table width, but in my case I need a solution WITHOUT setting the table width. This table will be dynamically generated and it will have several columns, so I need to set a fixed width for some columns.
Your help will be appreciated .
Mc

I'm assuming that the rows are shrinking when the table is bigger than the window. This makes sense since it would be better to show the content than to push it off the page in most instances.
One way you can force the columns not to shrink would be to create a spacer row. First create a 1 pixel transparent gif. Then create a row at the beginning or end of the table and put this image in each cell and give it the width of the row.
<td style="width:300px;">[img src="trans.gif" style="width:300px;height:1px;" /]<td>
Michael J

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |