有没CSS高手帮我解决个,页面显示的问题
样式如下:
<style type="text/css">
*{
margin:0;
padding:0;
}
#header {
width:1000px;
height:127px;
margin:0 auto;
}
#main {
width:1000px;
margin:0 auto;
}
#main #sidebar {
width:226px;
float:left;
}
#main #containe {
width:774px;
float:right;
}
#footer {
width:1000px;
height:137px;
margin:0 auto;
}
#clearfloat {
clear:both;
height:1px;
overflow:hidden;
margin-top:-1px;
}
</style>
DIV层这样设计:
<div id="header"></div>
<div id="main">
<div id="sidebar">
<table id="T3" width="226" height="166" border="0" cellpadding="0" cellspacing="0" runat="server">
<tr>
<td width="216" height="128"><table width="216" height="124" border="0" cellpadding="0" cellspacing="8" id="Table3">
<tr>
<td width="72" align="right" class="login" style="height: 27px">用户名:</td>
<td width="120" style="height: 27px"><input id="username" type="text" style="width: 105px" runat="server" name="Username" /></td>
</tr>
<tr>
<td align="right" class="login" style="height: 33px">密 码:</td>
<td style="height: 33px"><input id="pwd" type="password" style="width: 105px" runat="server" /></td>
</tr>
<tr>
<td colspan="2" class="logincont" style="height: 21px"><div align="center"><a href="#">忘记密码</a> / <a href="#">用户注册</a></div></td>
</tr>
</table></td>
<td rowspan="2" style="width: 10px"><img src="images/logincont_02.jpg" width="10" height="166" alt=""/></td>
</tr>
<tr>
<td height="38">
<asp:ImageButton runat="server" ID="ImageButton1" src="images/logincont_03.jpg" OnClick="ImageButton1_Click"/></td>
</tr>
</table>
<table id="T4" width="226" height="166" border="0" cellpadding="0" cellspacing="0" runat="server">
<tr>
<td width="216" height="18" colspan="3"></td>
<td rowspan="6">
<img src="images/logincont_02.jpg" width="10" height="166" alt=""></td>
</tr>
<tr>
<td width="36" height="30" colspan="2" rowspan="3"></td>
<td></td>
</tr>
<tr>
<td><table width="200" border="0">
<tr>
<td width="137" style="height: 20px"><div align="center">
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label></div></td>
<td width="53" style="height: 20px">您好</td>
</tr>
</table></td>
</tr>
<tr>
<td width="180" height="9"></td>
</tr>
<tr>
<td width="14" height="79"></td>
<td colspan="2"><table width="203" height="77" border="0">
<tr>
<td width="110">您已登陆本站:</td>
<td width="83"><table width="76" border="0">
<tr>
<td width="46"><asp:Label ID="Label2" runat="server" Text="Label"></asp:Label></td>
<td width="20">次</td>
</tr>
</table></td>
</tr>
<tr>
<td>您上次登陆时间:</td>
<td><asp:Label ID="Label3" runat="server" Text="Label"></asp:Label></td>
</tr>
<tr>
<td>您已经发布:</td>
<td><table width="83" border="0">
<tr>
<td width="45"><asp:Label ID="Label4" runat="server" Text="Label"></asp:Label></td>
<td width="28">房源</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><div align="right"><span class="STYLE1">修改个人资料>></span></div></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="3">
<img src="images/rentiss_09.gif" width="216" height="39" alt=""/></td>
</tr>
</table>
<table id="Table5" width="226" height="202" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="226" height="26"><img src="images/leftbarnav_01.jpg" width="226" height="26" alt=""/></td>
</tr>
<tr>
<td height="35"><img src="images/leftbarnav_02.jpg" width="226" height="35" alt=""/></td>
</tr>
<tr>
<td style="height: 8px"><img src="images/leftbarnav_03.jpg" width="226" height="8" alt=""/></td>
</tr>
<tr>
<td height="35"><img src="images/leftbarnav_04.jpg" width="226" height="35" alt=""/></td>
</tr>
<tr>
<td height="43"><img src="images/leftbarnav_05.jpg" width="226" height="43" alt=""/></td>
</tr>
<tr>
<td style="height: 55px" valign="top" align="right"><img src="images/leftbarnav_06.jpg" width="226" height="55" alt=""/></td>
</tr>
</table>
<table id="Table4" width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td style="height: 18px" ></td></tr>
</table>
<table id="T8" width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td valign="top"><asp:contentplaceholder id="ContentPlaceHolder2" runat="server">
</asp:contentplaceholder></td></tr>
</table>
</div>
<div id="containe">
<img src="images/rightbar_01.jpg" width="774" height="83" alt=""/>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
<div id="clearfloat"></div>
</div>
<div id="footer"></div>
那么我的containe怎么会和sidebar叉开显示(就是左边的显示在内容左上,右边显示在内容的右下)
[解决办法]
大容器宽度要大于子容器宽度 否则会自动换行