我的页面上有下面的 html。我需要在 zoom_controls 类下方的 chart_div。下面的代码适用于 IE 和 Chrome,但在 Firefox 上,chart_div 会在页面上向右移动。有什么想法可能导致这种情况吗?
<div id="tab10">
<div id="container">
<table>
<tr>
<td>
<div class="zoom_controls"> <a class="profile" style="width: 100px;" id="volume_d" href="#" data-chart="line" data-range="1m">Volume</a>
<a class="profile" style="width: 100px;" id="Total" href="#" data-chart="line" data-range="1m">Total</a>
</div>
<div id="chart_div" style="width:700px; height:300px;"></div>
</td>
</tr>
</table>
</div>
</div>
这是我的 css 文件:
<style type="text/css">
.zoom_controls a {
display: block;
width: 80px;
height: 16px;
line-height: 16px;
margin-top: 3px;
float: left;
text-decoration: none;
color: black !important;
text-align: center;
border: 1px #CCC inset;
/* Should look a lot like the original :) */
background-image: linear-gradient(bottom, rgb(214, 214, 214) 34%, rgb(232, 232, 232) 100%);
background-image: -o-linear-gradient(bottom, rgb(214, 214, 214) 34%, rgb(232, 232, 232) 100%);
background-image: -moz-linear-gradient(bottom, rgb(214, 214, 214) 34%, rgb(232, 232, 232) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(214, 214, 214) 34%, rgb(232, 232, 232) 100%);
background-image: -ms-linear-gradient(bottom, rgb(214, 214, 214) 34%, rgb(232, 232, 232) 100%);
}
.zoom_controls a.active {
background-color: #a6d1ff;
background-image: linear-gradient(bottom, rgb(118, 175, 201) 34%, rgb(166, 209, 255) 100%);
background-image: -o-linear-gradient(bottom, rgb(118, 175, 201) 34%, rgb(166, 209, 255) 100%);
background-image: -moz-linear-gradient(bottom, rgb(118, 175, 201) 34%, rgb(166, 209, 255) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(118, 175, 201) 34%, rgb(166, 209, 255) 100%);
background-image: -ms-linear-gradient(bottom, rgb(118, 175, 201) 34%, rgb(166, 209, 255) 100%);
}
body {
font: 10px arial;
text-align:center;
width: 100%;
background: #F9F8F6;
margin-top:0;
border:0;
}
#top {
background: white;
margin-top:0;
}
table {
border-collapse:collapse;
border: 0;
margin:0 auto;
}
table caption {
text-align: left;
color: #00006E;
font-weight:bold;
font: 15px arial;
}
table td {
border: 0px;
}
#header {
text-align: center;
font: 12px sans serif;
}
#logo {
float: left;
}
hr {
background-color: #00006E;
border: 0 none;
color: #00006E;
height: 4px;
}
.tabs li {
list-style:none;
display:inline;
}
.tabs a {
padding:5px 10px;
display:inline-block;
background:#C0C0C0;
color:#000;
text-decoration:none;
text-align: center;
font: 18px sans serif;
font-weight: bold;
}
.tabs a.active {
background:#6E6EFF;
color:#fff;
}
h1 {
font: 25px sans serif;
font-weight: bold;
}
</style>