在我的网站
Family Law Act,我试图让两个水平行的图片/配置文件堆叠在一起.第一行是一个城市,最下面一行是另一个城市.顶行正确浮动,但正如您所见,底行不会浮动.而是将照片垂直堆叠在彼此之上.
它在Chrome和Firefox中运行良好,但在Internet Explorer 8中存在这个问题.
有任何想法吗?
CSS
#Vancouver {float:left; display:block; } .vancouver {float: left; padding-right: 10px;} #New_York {clear:both; float:left; display:block; margin-top:20px; } .newyork {float: left; padding-right: 10px; }
HTML
<div id="Vancouver"> <div class="headVan">Vancouver</div> <div class="vancouver a"> <ul> <li><img src="http://familylawact.ca/wp-content/uploads/2011/11/1.png" alt ="test" /></li> <li>Tom JErk</li> <li>firm: </li> <li>tel: </li> <li>profile </li> </ul> </div> <div class="vancouver b"> <ul> <li><img src="http://familylawact.ca/wp-content/uploads/2011/11/2.png" alt ="test" /></li> <li>Sam JErk</li> <li>firm: </li> <li>tel: </li> <li>profile </li> </ul> </div> <div class="vancouver c"> <ul> <li><img src="http://familylawact.ca/wp-content/uploads/2011/11/2.png" alt ="test" /></li> <li>Sam JErk</li> <li>firm: </li> <li>tel: </li> <li>profile </li> </ul> </div> <div class="vancouver d"> <ul> <li><img src="http://familylawact.ca/wp-content/uploads/2011/11/2.png" alt ="test" /></li> <li>Sam JErk</li> <li>firm: </li> <li>tel: </li> <li>profile </li> </ul> </div> <div class="vancouver e"> <ul> <li><img src="http://familylawact.ca/wp-content/uploads/2011/11/2.png" alt ="test" /></li> <li>Sam JErk</li> <li>firm: </li> <li>tel: </li> <li>profile </li> </ul> </div> </div> <div id="New_York"> <div class"headvic">New York</div> <div class="newyork a"> <ul> <li><img src="http://familylawact.ca/wp-content/uploads/2011/11/3.png" alt ="test" /></li> <li>Nat JErk</li> <li>firm: </li> <li>tel: </li> <li>profile </li> </ul> </div> <div class="newyork b"> <ul> <li><img src="http://familylawact.ca/wp-content/uploads/2011/11/4.png" alt ="test" /></li> <li>Jed JErk</li> <li>firm: </li> <li>tel: </li> <li>profile </li> </ul> </div> </div>