我正在試驗css的float
屬性。無法將邊框添加到網頁上的元素
我試圖編碼匹配兩個浮動div的高度。
兩個代碼
方法1.
<div style="overflow: hidden;">
<div style="background: blue;float: left;width: 65%;padding-bottom: 500px;
margin-bottom: -500px;border:1px solid White;">column a<br />column a</div>
<div style="background: red;float: right;width: 35%;
padding-bottom: 500px;margin-bottom: -500px;border:1px solid White;">column b</div>
</div>
方法2:
<div style="background-color: yellow;">
<div style="float: left;width: 65%; border:1px solid White;">column a</div>
<div style="float: right;width: 35%;border:1px solid White;">column b</div>
<div style="clear: both;"></div>
</div>
代碼工作的兩個,但我想創建跨columns.I邊界應用邊框屬性,但它沒有工作。是否有解決上述代碼添加邊框和比較與所有瀏覽器的tible。全長的
被修改代碼
方法3
<div style="background-color: yellow;">
<div style="float: left;width: 65%; border-right:1px solid White;">
column acolumn acolumn acolumn acolumn acolumn acolumn acolumn
acolumn acolumn acolumn acolumn acolumn acolumn acolumn acolumn acolumn
acolumn acolumn acolumn acolumn acolumn acolumn acolumn acolumn acolumn
</div>
<div style="float: right;width: 35%;border-right:1px solid White;">column b</div>
<div style="clear: both;"></div>
</div>
的DIV與列b沒有顯示邊界
在方法1我無法申請邊界。 任何人都可以提供解決這兩個問題。
你在哪裏申請邊框和你想在哪兒呢? – SpaceBeers 2012-07-19 12:07:59
問題沒有正確提問,重新構建它並使其更加清晰。 – Prateek 2012-07-19 12:19:01
我正在編輯它,請等待 – user1537788 2012-07-19 12:27:39