垂直对齐float div中的元素

时间:2014-09-16 22:56:07

标签: css css3 valign

我想在div的中间对齐里面的元素,div在容器内浮动到左边,我把我的代码

#page_content
{
position:relative;
width:80%;
height:80px;
margin:auto;
border:0px solid #fff;
overflow:hidden;
}


#page_content_col_left
{
float:left;
position:relative;
width:20%;
height:100%;    
}


#page_content_col_right
{
float:left;
position:relative;
width:80%;
height:100%;
background-color:#fff;
}

问题在于元素内部没有显示 - 垂直对齐 - 只显示在每个div的顶部

问题可以在这里看到:http://jsfiddle.net/21hcoLgn/

此致

相关问题