私は現在ウェブサイトをデザインしています。しかし、私の親divの1box_t
つでは、子divが外に出box_t1
ます。box_t2
box_t
HTML:
<div id="main_container">
<div class="box_t">
<div class="box_t1">
<h2>Start</h2>
</div>
<div class="box_t2">
<div class="boxt21">
<h2>Name</h2>
</div>
<div class="boxt22">
Hi
</div>
</div>
</div>
</div>
CSS:
#main_container
{
width:960px;
margin:0 auto;
}
.box_t
{
padding:20px 14px 20px 15px;
color:#07337a;
overflow:hidden;
}
.box_t h2
{
font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
}
.box_t1
{
width:340px;
float:left;
}
.box_t2
{
float:left;
}
.box_t2
{
margin-left:255px;
}
.boxt21
{
float:left;
}
.boxt22
{
float:left;
}