2011-04-07 74 views

回答

2

最簡單的方法具有相同高度三個欄佈局是使用faux column background technique

您還可以嘗試給與三個divs大底部墊與巨大的底部邊緣與容器與overflow: hidden。儘管如此,它並不能很好地與內聯錨相媲美。

+0

thanks.I'v試過這個並且工作。但有什麼更好的主意? – thecodeparadox 2011-04-07 05:48:55

+0

@abdullah不好意思,對不起。如果你不需要支持 alex 2011-04-07 05:55:39

+0

以前是better.coz,我必須支持ie7 + – thecodeparadox 2011-04-07 06:02:40

0
<html><body> 

<div>

<div style="float:left;height: 33.33%;width:10%;background-color:red">zdfsfs</div> 
<div style="float:left;height: 33.33%;width:10%;background-color:blue">zgfsgsgfsgf</div> 
<div style="float:left;height: 33.33%;width:10%;background-color:cyan">zvgzcxgvxz</div> 
</div></body></html> 
+0

但是當內容隨機增加會發生什麼 – thecodeparadox 2011-04-07 06:00:19

+0

我給了小width.you可以增加width.and仍然內容較大,那麼內容會出div,這種解決方案將無法正常工作。我會盡力找到它的解決方案,並讓我知道如果我得到它。 – Poonam 2011-04-07 06:15:30

+0

謝謝。但我認爲我所接受的'alex'給出的解決方案更好。嘗試這個。 – thecodeparadox 2011-04-07 06:24:30