html - Aligning a div with 2 divs inside it in Center -

currently im trying 2 divs align in center, not quite sure how it. go left side default.
i had margin-left:14 % , align in center, when re-sized window weird because aligned right side.
tried with marign-left/right:auto, no result.
html
<div id="panels">  <div id="panel-left">            </div>  <div id="panel-right">   </div>     css
#panels{  padding-top:15px;  margin-left: auto;   margin-right: auto;  }    #panel-left{  width:32%;  min-width:209px;  overflow:hidden;  background-color:white;  float:left;  padding-left:25px;  height:473px;  }    #panel-right{  width:32%;  min-width:209px;  height:473px;  background-color:white;  float:left;  padding-left:25px;  }  
try this:
css
#panels{     padding-top:15px;     text-align:center;     display: block; }  #panel-left{     width:32%;     min-width:209px;     overflow:hidden;     background-color:black;     height:473px;     display: inline-block; }  #panel-right{     width:32%;     min-width:209px;     height:473px;     background-color:orange;     display: inline-block; }        
Comments
Post a Comment