div不听话啊,位置不对,怎么回事呢?
<body style="text-align:left; margin:0px auto; padding:0px; border:0px; width:850px; font-family:宋体; font-size:12px">
<form id="form1" runat="server">
<div style="width:850px">
<div style="width:550px; height:20px; float:left;border:solid 1px red">这个是标题</div>
<div style="width:550px; height:100px; float:left;border:solid 1px blue">这个是内容</div>
<div style="width:250px; height:120px; float:left;border:solid 1px green">这个是右边</div>
</div>
</form>
</body>
怎么右边的会在标题框下边一点的呢?不可以平着标题框吗?
------解决方案--------------------估计是你的宽度相加大于850吧,因为有border
------解决方案--------------------
------解决方案--------------------不听话就抽它
------解决方案--------------------你把宽度设置为百分比吧
HTML code
<body style="text-align:left; margin:0px auto; padding:0px; border:0px; width:100%; font-family:宋体; font-size:12px">
<form id="form1" runat="server">
<div style="width:85%">
------解决方案--------------------
HTML code
<body style="text-align:left; margin:0px auto; padding:0px; border:0px; width:850px; font-family:宋体; font-size:12px">
<form id="form1" runat="server">
<div style="width:850px">
<div style="width:550px; float:left;border:">
<div style="width:550px; height:20px; float:left;border:solid 1px red">这个是标题</div>
<div style="width:550px; height:100px; float:left;border:solid 1px blue">这个是内容</div>
</div>
<div style="width:250px; height:120px; float:left;border:solid 1px green">这个是右边</div>
</div>
</form>
</body>
------解决方案--------------------