Search code examples
cssvalign

Vertically align elements in float divs


I want align in middle of divs the elements inside , the divs float to the left inside container , i put my code

#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;
}

The problem it´s inside the elements no show in middle - vertical align - , only show in the top of each div

The problem can see here : http://jsfiddle.net/21hcoLgn/

Regards


Solution

  • Check here: Is it possible to vertically align text within a div? and here: http://deeson-online.co.uk/labs/how-centre-align-text-or-content-vertically-css