
改变浏览器窗口宽度 页面元素自动往下跑
还是上图吧,改变浏览器宽度有个元素就跑到下边去了,应该还是在本来的地方啊,浏览器下部分有个拖动菜单。怎么解决这个问题...
还是上图吧,改变浏览器宽度有个元素就跑到下边去了,应该还是在本来的地方啊,浏览器下部分有个拖动菜单。怎么解决这个问题
展开
1个回答
展开全部
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>MB5U</title>
<style type="text/css">
#content_c {width:1000px; height:80px; border:0px; margin:auto; background:yellow;}
#content_a {width:800px; height:700px; float:left; border:1px solid #000; margin:20px 0 0 0; background:#ccc;}
#content_b {width:181px; height:300px; float:left; border:1px solid #000; margin:20px 0 0 15px; background:#999;}
#content_e {width:750px; height:300px; margin:20px auto; background:#33CC00;}
#content_d {width:300px; height:30px; background:#330099;margin:30px auto 0 auto; border:0px; clear:left}
#MainDiv {width:1000px; margin:auto;}
</style>
</head>
<body>
<div id="content_c">这又是一个DIV</div>
<div id="MainDiv">
<div id="content_a"><div id="content_e"></div></div>
<div id="content_b">MB5U.com 这是第二个DIV</div>
<div style="clear:both;"></div>
</div>
<div id="content_d"></div>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>MB5U</title>
<style type="text/css">
#content_c {width:1000px; height:80px; border:0px; margin:auto; background:yellow;}
#content_a {width:800px; height:700px; float:left; border:1px solid #000; margin:20px 0 0 0; background:#ccc;}
#content_b {width:181px; height:300px; float:left; border:1px solid #000; margin:20px 0 0 15px; background:#999;}
#content_e {width:750px; height:300px; margin:20px auto; background:#33CC00;}
#content_d {width:300px; height:30px; background:#330099;margin:30px auto 0 auto; border:0px; clear:left}
#MainDiv {width:1000px; margin:auto;}
</style>
</head>
<body>
<div id="content_c">这又是一个DIV</div>
<div id="MainDiv">
<div id="content_a"><div id="content_e"></div></div>
<div id="content_b">MB5U.com 这是第二个DIV</div>
<div style="clear:both;"></div>
</div>
<div id="content_d"></div>
</div>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询