最高保证金没有在两个部门上移动

时间:2015-04-04 12:01:49

标签: html css

好的,所以我有两个div,' about-wrap'和&#t;包装'。我可以更改about-wrap的上边距但不能更改tc-wrap。我发现了一个旧的问题,说你需要浮动div,但是没有它的约束包装,并且tc-wrap不能使用它。这是我的HTML:

<div id="about-wrap">
        <div class="about">
            <p></br><h1><bold>About Us</bold></h1></p>

            <p class="about-us"><h5>Next Gen was founded in late 2014 by nG Fearr (then known as nG FearIess). It began as an XBox 360 clan, now trying to grow in XBox One. We are multi-COD players, and play Modern Warfare 3 and 2, Advanced Warfare and mainly Black Ops 2. Although Next Gen began with only 1 founding member, it has rapidly grown and currently has over 25 clan members. 
            </br></br>
            In Next Gen, our primary focus is sniping/feeding. We currently have an RC and are looking for snipers. If you would like to join, please submit your clips and contact us. For information about try outs, please contact our leader at nextgengaming@tryout.com .</h5></p>
    </div>
</div>

<div id="tc-wrap">
    <div class="tc">
        <p>Test</p>
    </div>
</div>

和我的CSS:

#about-wrap {
width: 58.5%;
background-color: #FFF;
width: 800px;
height: 600px;
margin-left: 3%;
margin-top: 6%;
}

.about h1 {
    font-family: "Bitter";
    color: #000b22;
    margin-left: 3%;
}

.about h5 {
    font-family: "Roboto";
    color: #3d4942;
    margin-left: 3%;
}

.tc {
    width: 21%;
    background-color: #000;
    height: 60px;
    margin-right: 3%;
    float: right;
}

请告诉我错误的原因..谢谢。

1 个答案:

答案 0 :(得分:0)

我明白了。我改变了

#about-wrap {
width: 58.5%;
background-color: #FFF;
width: 800px;
height: 600px;
margin-left: 3%;
margin-top: 6%;
}

.about h1 {
    font-family: "Bitter";
    color: #000b22;
    margin-left: 3%;
}

.about h5 {
    font-family: "Roboto";
    color: #3d4942;
    margin-left: 3%;
}

.tc {
    width: 21%;
    background-color: #000;
    height: 60px;
    margin-right: 3%;
    float: right;
}

到这个

#about-wrap {
    width: 58.5%;
    float: left;
    background-color: #FFF;
    height: 400px;
    margin-top: 6%;
    margin-left: 3%;
}

.about h1 {
    font-family: "Bitter";
    color: #000b22;
    margin-left: 2%;
}

.about h5 {
    font-family: "Roboto";
    color: #3d4942;
    margin-left: 2%;
}

#tc-wrap {
    float: right;
    width: 31%;
    background-color: #fff;
    height: 400px;
    margin-top: 6%;
    margin-right: 3%;
} 

我保持HTML一样。这是result