0

ここに次のコードを入れました

ボックスに問題があり、jsfiddleにどのように表示されているかを表示していますが、960グリッド内の一番上の行にさらに2つのスペースがあります。

なぜそれを2行にプッシュするのですか?

HTML:

        <div id="holder">
            <div id="box" class="box">
                <p>Text</p>
                </div>
                <div id="box" class="box">
                    <p>Text</p>
                    </div>
                    <div id="box" class="box">
                        <p>Text</p>
                        </div>
                        <div id="box" class="box">
                            <p>Text</p>
                            </div>
                            <div id="box" class="box">
                                <p>Text</p>
                                </div>
                                <div id="box" class="box">
                                    <p>Text</p>
                                    </div>
            </div><!-- Holder End -->

CSS:

#holder{width:100%;height:600px;}    
.box{width:260px;min-height:350px;float:left; border:1px solid red;}
    #box{margin-right:80px;}​
4

2 に答える 2

2

Your margin-right: 80px; is adding an extra 80px width to each element, therefore you are most likely running out of room there. Try removing the 80px of the right margin, and seeing if it fits okay. From there, adjust the margin to fit everything in the right place. Perhaps maybe 60px. That should work

于 2012-10-28T23:32:05.517 に答える
0
于 2012-10-28T23:27:24.230 に答える