我的 css 似乎没有被拾取,我遇到了问题。我有 3 种不同类型的具有相同字符的样式。奇怪的是,当我应用<div class = "block halfleft">..</div>
它时,它会显示正确的样式,但<div class = "twoblock halfleft">
似乎不起作用!任何想法是什么原因造成的?
CSS
#member {
padding: 0;
}
#member .block {
width: 960px;
margin-bottom: 40px;
padding-left:30px;
height: 475px;
float: left;
text-align: left;
}
#member .twoblock {
width: 960px;
margin-bottom: 0;
padding-left:75px;
padding-bottom: 75px;
height: 100%;
float: left;
text-align: left;
}
#member .threeblock {
width: 960px;
margin-bottom: 0;
padding-left:75px;
padding-bottom: 75px;
height: 500px;
background-color: #fff;
float: left;
text-align: left;
}
#member .block.halfleft, #member .twoblock.halfleft, #member .threeblock.halfleft{
width: 520px;
height: 240px;
float: left;
padding-top: 25px;
}
#member .block.halfright, #member .twoblock.halfright, #member .threeblock.halfright{
width: 350px;
height: 240px;
float: left;
padding-top: 55px;
}
页
//WORKS://
<div class="block">
<div class="block halfleft">//text//</div>
<div class="block halfright">//text//</div>
</div>
//DOESNT WORK BUT WHAT I WANT TO MAKE WORKING://
<div class="twoblock">
<div class="twoblock halfleft">//text//</div>
<div class="twoblock halfright">//text//</div>
</div>
//WORKS://
<div class="twoblock">
<div class="block halfleft">//text//</div>
<div class="block halfright">//text//</div>
</div>