</div> <div class="box4"><div class="box2"> <h1>ボックス2</h1> </div> <div class="box3"> <p>あいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえお</p> </div>
</div> </body> </html><h1>ボックス4</h1>
これに対して
- {
padding:0;
margin:0;
}
body{
margin: 0;
}
.boxA:after{
display: block; clear: both;
}
.box1{
background-color: red;
height:200px;
}
.box2{
background-color: blue;
float: left;
height:300px;
width:100%;
margin-right: -300px;
}
.box3{
background-color: gray;
float:left;
height:300px;
width:300px;
}
.box4{
background-color: green;
height:200px;
}
というCSSなのですが
ボックス4だけ色指定をしているにも関わらず無色になってしまいます。
なぜでしょうか?
初心者ですが宜しくお願い申し上げます。
回答4件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/12/01 10:18