我正在试验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