DIV with overflow:auto and a 100% wide table

前端 未结 8 1384
不思量自难忘°
不思量自难忘° 2021-01-30 03:23

I hope someone might be able to help me here. I\'ve tried to simplify my example as best I can.

I have an absolutely positioned DIV, which for this example I\'ve made fi

8条回答
  •  耶瑟儿~
    2021-01-30 04:13

    Eran Galperin's solution fails to account for the fact that simply turning off horizontal scrolling will still allow the table to underlap the vertical scrollbar. I assume this is because IE is calculating the meaning of "100%" before deciding that it needs a vertical scrollbar, then failing to re-adjust for the remaining horizontal space available.

    cetnar's solution above nails it, though:

    ...

    This works properly on IE6 and 7 in my tests. From what I can tell, the "" hack doesn't appear to actually be necessary on IE6.

提交回复
热议问题