简体   繁体   中英

CSS scrollbar in div doesn't work in FF

The below HTML used to show a vertical scrollbar in FF3.x and IE. I have installed FF6.0.2 and the scrollbar doesn't show up anymore!!

<html>
    <body>
        There should be a scroll bar on the page
        <div style="background:red;position: relative; left: -1px; width: 19px; height: 300px; overflow: auto;">
            <div style="background:green;width: 1px; height: 540px;"></div>
        </div>
    </body>
</html>

How can I get my scrollbars to appear with latest FF? This still works in IE9. I think this is an issue with the combination of Windows7(Home Premium) and FF6.0.2. I tested this on Windows XP and FF6.0.2 it works fine.

在此处输入图片说明

Try setting your overflow to scroll:

overflow:scroll;

Is this what you're looking for?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM