固定宽高的div布局

<!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=utf-8" />
<title>主页</title>
<style tpye="text/css">
<!--
body{text-align:center;}           /***********这个是限定主面的居中效果,如果没有,默认在左侧显示*********/

#header{margin:0px;clear:both;background:black;width:800px;height:100px;text-align:center;padding-top:12px;}
                 
#mainbox{margin:0px 0px;width:800px;background:blue;height:410px;}

#sidebar{margin:10px 0px 0px 12px;float:left;background:red;width:200px;height:400px;}     /*******上右下左*******/
 
#menu{margin:12px 0px 0px 12px;background:red;height:30px;float:left; width:576px;}

#content{margin:12px 0px 0px 12px;width:576px;height:356px;float:left; background:#FF0000;}

#footer{margin-rop:0px;width:800px;height:40px;background:#fff000;}
-->
</style>
</head>
<body>
    <div id="header"><font size="3" color="#FFFF33">头部</font></div>
    <div id="mainbox">
        <div id="sidebar">可放菜单</div>
        <div id="menu">可放导航</div>
        <div id="content">内容
         <div align="left">内容里面</div>
      </div>
    </div>
    <div id="footer">这里是foot部分,放置版权啥的</div>
</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值