开发者

IE specific: getting rid of scrollbars

开发者 https://www.devze.com 2023-01-15 14:07 出处:网络
I have two divs like this <div style=\"position:relative; width: 500px; overflow:auto\"> <div style=\"position:absolute; top:0;left:0;width:100%\">

I have two divs like this

<div style="position:relative; width: 500px; overflow:auto">
         <div style="position:absolute; top:0;left:0;width:100%">
         </div>
</div>

Now the problem in IE i开发者_如何学Gos Scrollbars start to appear unnecessarily for the outer div. Even when i have specified the inner div's width to be 100% it extends more than it is supposed to. Works fine in Firefox, Chrome. IE is causing problems.


Try removing overflow:auto property from outer div


Try specifying a margin-right:-1px for IE only using ConditionalComments ( apply it to the AP'd el )

0

精彩评论

暂无评论...
验证码 换一张
取 消