2013-04-07 115 views
0

我有麻煩低於CSS我似乎無法得到白框旁邊的品牌對齊框:股利不對齊

Live URL

HTML:

<div class="homeWrapper"> 
      <div class="homeWrapperContentLeft"> 
     <div id="default"> 
      <div class="content_inner"> 
      <h1><span class="color_red">Welcome</span>/h1> 
      <p> 
      </p> 
     </div> 
     <div class="brands"> 
      <h1><span class="color_red">Products</span> by Brand</h1> 
      <table class="manufacturer_table" height="24" style="width: 100%;" width="242"> 
<tbody> 
<tr> 
<td> 
</tbody> 
</table> 

<div class="homeWrapperContentLeftCenter"> 
    text 
</div> 
     </div> 
     </div> 
     </div> 
     </div> 

CSS:

.homeWrapperContentLeft{ 
    width:628x; 
    height:825px; 
    background-color: red; 
} 
.homeWrapperContentLeft .brands{ 
    float:left; 
    width:251px; 
    height:598px; 
    padding: 12px; 
    clear: both; 
} 

.homeWrapperContentLeftCenter{ 
    float:left; 
    width: 377px; 
    height: 598px; 
    background:#000; 
} 
+0

黑匣子?我沒有看到一個白色的盒子。 – iGanja 2013-04-07 04:04:07

回答

1

你必須在custom.css線無效的CSS:

.homeWrapperContentLeft{ 
    width:628x; /* should be px not x */ 
    height:825px; 
    background-color: red; 
} 

而在行你給寬度爲66px的包裝。請將其更改爲auto100%

.homeWrapper{ 
    padding: 12px; 
    width:66px; 
} 

接下來的事情是,你必須有float: left和你在一個非常低的寬度保持它這個.homeWrapperContentLeft .brands類。刪除widthfloat: left;

.homeWrapperContentLeft .brands{ 
    float:left; 
    width:251px; 
    height:598px; 
    padding: 12px; 
    clear: both; 
} 

最後,採取.homeWrapperContentLeftCenter.brand的。這解決了你的問題。

+0

好抓。不知道它解決了他的問題。它確實使它更具可讀性。 – iGanja 2013-04-07 04:06:38

+0

@iGanja是的,還有更多。我只是一個一個尋找並修復它們。 – 2013-04-07 04:07:23

+0

謝謝,仍然無法得到爲什麼它不漂浮 – 2013-04-07 04:09:36