DIV with overflow:auto and a 100% wide table

前端 未结 8 1306
不思量自难忘°
不思量自难忘° 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

    If it's the body tag that insists on having the horizontal scroll (I guess because I have child elements set to 100%) you can add this to your CSS to fix the problem in IE7 (or 8 compatibility mode):

    html{overflow-x:hidden;}
    
    0 讨论(0)
  • 2021-01-30 04:13

    Unfortunately, this is a quirk of IE. There's no way using pure XHTML and CSS to get it to work the same as Firefox.

    You could do it using JavaScript to detect the size of the window and set the width of the table dynamically. I can add more detail on that if you really wanted to go that route.

    0 讨论(0)
提交回复
热议问题