Having no problem managing tds width in Internet Explorer 7 and 8

I am setting the width using:

style="width: 200px"

      

When the browser window is narrow, the td is the correct width. When I make the window wide, the td expands wider than I set it to. Any ideas?

0


a source to share


3 answers


I am assuming that you have specified the width in the actual table and the cells in your table are not equal to the width of the table. So an internet explorer, and I suspect most other browsers, should compensate and expand all cells, including fixed width.

Either remove the width specification from your table, or change one of the cells in the table to something more flexible like width = "10%".



However, this is unlikely to be a good approach, although it might get you on the right track. @Darko Z is right, we need more code.

0


a source


Try using colgroups .



Alternatively, you can try playing with other style attributes like dysplay, etc. I suppose if you specify a fixed width for each column, you should be setting a fixed width on the table element.

0


a source


You are almost certainly out of luck here.

The browser treats many nested auto-tuning tables as one big tricky thing. It tries to find the optimal layout based on the content width (minimum and maximum) of the content and various settings, such as the one you have. None of the settings are considered set in stone.

So, if you have simple and consistent requirements, they will be met. Otherwise, all bets are disabled.

0


a source







All Articles