我想要在頁面中心並排顯示兩個圖像。我的身體寬度是800px。在IE 8中不是並排顯示圖像,但在IE 11和Firefox中可以正常顯示
在Firefox 31.0,Firefox 20和IE 11中,圖像以這種方式顯示,但在IE 8中,圖像垂直堆疊,水平居中,每邊大約190px的垂直空白帶。
我認爲這可能是由於當並排寬度接近800px時,IE 9可能會將它們包裹起來以便垂直堆疊。我嘗試了300像素以下的圖像,它們仍然在IE中垂直堆疊。
所有建議領受
<div class="gearSection" style="text-align:center;display: block;">
<div style="border:1px solid blue; display:inline-block; margin-left:auto; margin-right:auto;margin-top:2px;margin-bottom:2px;">
<img src="images/Hoodie_02.jpg" border="0" width="380px" height="633px" alt="Hoodie"><br><b>Hoodies</b>
</div>
<div style="border:1px solid blue; display:inline-block; margin-left:auto; margin-right:auto;margin-top:2px;margin-bottom:2px;">
<img src="images/Hat_02.jpg" border="0" width="380px" height="633px" alt="Hat"><br><b>Beanie Hat</b>
</div>
</div>
也許嘗試此[鏈接](http://stackoverflow.com/questions/9110646/ie8-display-inline-block-not-working)它談論陳述了''和使用'display:inline-block' –
DavidT
2014-09-11 11:41:56