html - IE7和IE8的兼容性问题

标签 html css internet-explorer web

我有一个 CSS,它将只显示带有垂直滚动条的内容,而不是水平滚动条。

我的 CSS 是,

div.rightSide {
display: inline;
float: right;
height: 234px;
margin: 5px 0;
overflow-y: auto;
position: relative;
vertical-align: middle;
visibility: inherit;
width: 300px;
z-index: 6;
}

它在 IE8 和 Mozilla 3.6 中按预期工作,但当我在 IE7 中测试时,垂直滚动条也会显示。那么我应该怎么做才能克服这个问题呢?

编辑

添加我的 HTML 代码。

<body>
    <div>
        <div id="contentColumn">
            <div class="overviewPage">
                <div class="instructionContent" id="sample_id">
                    <div class="overviewBackground" style="z-index: 3;">
                        <p class="sidebar_body">
                            <img align="center" border="0" height="244"
                                src="../images/product/sample.jpg" width="752" />
                        </p>
                    </div>
                    <div class="rightSide">
                        <div class="unitOverview">
                            <p class="body">
                                <span class="bold">Unit 1 Overview</span>
                            </p>
                            <div class="sectionContents">
                                <div class="subhead_pri"> 
                                <!-- My title goes here -->
                                </div>
                                <div class="sectionBody" style="overflow:hidden;width:100%">
                                    <p class="body"> 
                                    <!-- My content Goes here -->
                                    </p>
                                </div>
                            </div>
                        </div>
                        <div class="vendor">ID: vendor1</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>

谢谢, 杰亚

最佳答案

也将 overflow-x: hidden; 添加到您的 css。

关于html - IE7和IE8的兼容性问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8416090/

相关文章:

html - 更改高度和宽度的元素中的垂直居中文本

html - 我的媒体查询不起作用

html - 我无法在下拉菜单中获得过渡效果

javascript - 不使用 jquery Datepicker 选择日期范围

css - 固定元素上的自动宽度不适用于 IE11

css - 不使用 float 对齐

c# - 无法将文本框中的值读入javascript变量

jquery - 自动调整大小和粘性(顶部和底部)div jQuery

internet-explorer - Bootstrap 中的面包屑导航在 IE 中重叠

c# - Internet Explorer PDF 阅读器