why is the inner div floated, if it's not needed just center the inner div?
.inner {
margin:10px auto;
border:1px solid #898989;
padding:4px;
width:200px;
background-color:#f2f2f2;
}
OR if inner is floated so it contains further floats.. then you could add overflow hidden to it
.inner {
overflow: hidden;
margin:10px auto;
border:1px solid #898989;
padding:4px;
width:200px;
background-color:#f2f2f2;
}
or you could make inner into an inline block- and wrap it in a div with text-align: center;
<div class="outer">
<div class="inner"><span>float</span>the inner text</div>
<div class="inner"><span>float</span>the inner text</div>
<div class="inner"><span>float</span>the inner text</div>
<div>
.inner {
display: inline-block;
margin:10px;
border:1px solid #898989;
padding:4px;
width:200px;
background-color:#f2f2f2;
}
.inner {display: inline !ie7;}
span {float: left; width: 50px; height: 50px; background: #ffe;}
.outer {text-align: center;}