头部内容1000px
Left 252px 高度自适应
Right 748px 高度自适应
尾巴内容1000pxDiv+css代码怎么写?新手分不高,就这点全出了!
Left 252px 高度自适应
Right 748px 高度自适应
尾巴内容1000pxDiv+css代码怎么写?新手分不高,就这点全出了!
解决方案 »
- 新手 问个jsp 的小问题,希望大家帮我解答下
- spring + hibernate cascade rollback
- 自动发邮件问题
- Struts的几个疑问
- struts的一个ActionForm里面有个日期输入,怎么可以允许空呢?
- 一个是sql 的查询问题
- 哪位给我一个ojdbc14.jar
- 急,急!!求教:java开发socket服务器及客服端的问题
- 已经写好并测试通过的导出成excel的jsp,但不知道该如何调用.请高手帮忙-----在线等待
- tomcat4.1显示jsp的中文页面时总是乱码,应该如何解决
- cookie禁用后怎么还会发送cookie呢
- 大型网站的新闻发布系统解决方案是什么样子的?
但是,div又比较复杂,因为嵌套的多了,外层不一定跟内层高度一致所以没有非常好的方法,能做的就是上面那两种或者通过js动态控制
height:auto!important;height:360px;min-height:360px;
height:auto!important;height:360px;min-height:360px;
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.box {
width: 1000px;
}
.head {
width: 100%;
background-color: #CCCCCC;
}
.main{
}
.left {
float: left;
width: 252px;
height: auto;
background-color: #0099FF;
}
.right {
float: right;
width: 748px;
height: auto;
background-color: #339999;
}
.bottom {
width: 100%;
background-color: #666666;
}-->
</style>
</head><body>
<div class="box">
<div class="head">头部</div>
<div class="main">
<div class="left">
左边
左边
左边
左边
左边
左边
左边
左边
左边
左边
左边
左边
左边
左边
</div>
<div class="right">
右边
右边
右边
右边
</div>
</div>
<div class="bottom">尾部</div>
</div>
</body>
</html>不知道这个代码能否满足你的要求?
left、right的高度可以根据你的内容自适应。
当然,head、bottom部分高度可以自行调整。