0
的jsfiddle:https://jsfiddle.net/o6ekutaL/另一個垂直對齊問題
HTML
<div id="main-body-wrap">
<div id="main-body">
<div id="home-featured-classes-wrap">
<div class="home-featured-class-A">
<div class="home-featured-class-4"> TEXT
<h6 class="products">TEXT
</div>
<div class="home-featured-class-3">THIS DIV NEEDS TO BE IN THE MIDDLE OF THIS PINK DIV, NOT AT THE TOP</div>
<div class="clear"></div>
</div>
</div>
<div class="clear"></div>
</div></div>
CSS
/* MAIN BODY */
#main-body-wrap{
width:100%;
height:auto;
margin: 0 auto;
border-bottom: 1px solid #211c20;
padding: 30px 0 30px 0;
}
#main-body{
width:960px;
height:auto;
margin: 0 auto;
}
.clear {
clear: both;
}
.home-featured-class-2{
width:628px;
height:auto;
margin:0 30px 0 0;
border: 1px solid #211c20;
float:left;
}
.home-featured-class-3{
width:628px;
height:auto;
margin:0 0 0 30px;
border: 1px solid #211c20;
float:left;
}
.home-featured-class-4{
width:298px;
height:auto;
margin:0 0px 0 0;
border: 1px solid #211c20;
float:left;
}
.home-featured-class-A{
width:100%;
height:auto;
background:#C3C;
vertical-align:middle;
}
#home-featured-classes-wrap{
width:auto;
height:auto;
margin: 30px 0 0 0;
}
我有更多的麻煩垂直對齊「家電功能,講座粉紅色'家庭特色A級'分區中的3'div。有人可以幫忙嗎?我從未與垂直對齊成功