0

私のページには以下の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>

http://jsfiddle.net/isherwood/QphhM/1/

4

2 に答える 2

1

あなたの

<div id="chart_div" style="width:700px; height:300px;"></div>

clear:bothスタイル属性を追加します。

<div id="chart_div" style="width:700px; height:300px;clear:both"></div>
于 2013-09-11T16:06:55.990 に答える
1

これを試してください:

#chart_div {clear: left;}

http://jsfiddle.net/isherwood/QphhM/2/

于 2013-09-11T16:07:42.483 に答える