我有 2 个按钮,它们应该显示在另一个 div 上方。但是在 Internet Explorer 中,2 个按钮显示在与 div(应该在下方)相同的 y 水平/轴上。
注意:HTML 在 Firefox 和 Chrome 中正确显示(2 个按钮在 div 上方)但在 IE 上,按钮不显示在 div 上方。
它应该是这样的,它在 firefox 中确实是这样的:
但这是 IE 显示 HTML 的方式:
你能帮我修复显示,使 2 个按钮位于 IE 中“类(class)”div 的上方吗?
<html>
<head>
<title> </title>
<style type="text/css">
<!--
#navBar {
text-align: left;
margin: 0 auto;
padding: 0 auto;
margin-top: 10px;
position: fixed;
}
.leftAlignButton {
margin-left: 2px;
float: left;
}
.rightAlignButton {
float: right;
margin-right: 54px;
}
.navTab {
background: url(images/tag.png) top right no-repeat;
overflow: hidden;
padding: 8px 10px 12px 10px;
width: 155px;
height: 50px;
}
.navTab select {
width: 110px;
height: 25px;
}
.navTab input {
width: 100px;
}
.navText {
color: #FFFFFF;
font-family: "Onyx", "Arial", Serif;
font-size: 23px;
letter-spacing: 1px;
}
-->
</style>
</head>
<body>
<div id="navBar">
<div id="buttonTab">
<a class="leftAlignButton" href=""><img src="images/closeBt.png" alt="Close"/></a>
<a class="rightAlignButton" href=""><img src="images/goBt.png" alt="Go"/></a>
</div>
<div class="navTab">
<p class="navText">Course:</p>
<select>
<option>Breakfast</option>
</select>
</div>
</div>
</body>
</html>
最佳答案
尝试添加
#buttonTab { overflow:hidden }
编辑:只是阅读其他人提交的相同内容。
关于javascript - 仅在 IE 中按钮位置不正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7943343/