How can I center div in div in IE7

desperado2

New Member
HTML:\[code\]<div class="wrapper"> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div></div>\[/code\]CSS:\[code\].wrapper{ width:1000px; text-align:center; float:left; }.wrapper .box{ width:300px; height:50px; display:inline-block; background:#F00; margin:0 10px 10px 0; overflow:hidden; }\[/code\]I want to center all div in wrapper div like this;
SdtBC.jpg
Above codes work fine in IE8,IE9,Chrome,Safari,Opera,FF but not working in IE7. When I open page in IE7, page looks like this;
r4NuD.jpg
If I use float:left, the problem seems to be solved but all divs based on the left. How can I solve this?http://jsfiddle.net/eBxFX/2/
 
Back
Top