css,div简单应用
2010-11-09 22:44
501 查看
css文件:
body { font-family:Verdana; font-size:10px; margin:0;}
#container {margin:0 auto; width:100%;}
#mainContent { height:200px; margin-bottom:5px;}
#left { float:left; width:250px; height:200px; background-color:#999;}
#right { float:right; width:250px; height:200px;background-color:#999;}
#conter { margin:0 205px !important; margin:0 202px; height:200px; background-color:#CCC;}
#below1 { height:150px; background-color:#CCC; margin-top:5px; margin-bottom:5px;overflow-y:scroll;}
#below2 { height:150px; background-color:#CCC; margin-bottom:5px; overflow-y:scroll;}
#footer { height:40px; background-color:#FFC;}#mainContent #below1 div table {
font-family: Verdana, Geneva, sans-serif;
}
jsp文件:
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<link href="layout.css" rel="stylesheet" type="text/css" />
<head>
</head>
<body>
<div id="container">
<div id="header">This is the Header</div>
<div id="mainContent">
<div id="left">This is the left</div>
<div id="right">This is the right</div>
<div id="conter"></div>
<div id="below1"></div>
<div id="below2">This is the below2</div>
</div>
<div id="footer">
<span style="display:none"></span>
</div>
</div>
</body>
</html>
body { font-family:Verdana; font-size:10px; margin:0;}
#container {margin:0 auto; width:100%;}
#mainContent { height:200px; margin-bottom:5px;}
#left { float:left; width:250px; height:200px; background-color:#999;}
#right { float:right; width:250px; height:200px;background-color:#999;}
#conter { margin:0 205px !important; margin:0 202px; height:200px; background-color:#CCC;}
#below1 { height:150px; background-color:#CCC; margin-top:5px; margin-bottom:5px;overflow-y:scroll;}
#below2 { height:150px; background-color:#CCC; margin-bottom:5px; overflow-y:scroll;}
#footer { height:40px; background-color:#FFC;}#mainContent #below1 div table {
font-family: Verdana, Geneva, sans-serif;
}
jsp文件:
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<link href="layout.css" rel="stylesheet" type="text/css" />
<head>
</head>
<body>
<div id="container">
<div id="header">This is the Header</div>
<div id="mainContent">
<div id="left">This is the left</div>
<div id="right">This is the right</div>
<div id="conter"></div>
<div id="below1"></div>
<div id="below2">This is the below2</div>
</div>
<div id="footer">
<span style="display:none"></span>
</div>
</div>
</body>
</html>
相关文章推荐
- 在html中div+css布局的简单应用(适合初学者了解)
- 在html中div+css布局的简单应用(适合初学者了解)
- DIV+CSS网页设计布局应用详解视频教程
- DIV+CSS应用_基础知识
- JS+CSS简单实现DIV遮罩层显示隐藏
- 体验css+div 之 实现简单浮动层的基本方法
- JS+CSS简单实现DIV遮罩层显示隐藏
- 最简单实用的 jquery 选项卡 DIV+CSS 页面内可放置无限多个选项卡
- 简单的盒子模型Div+Css
- DIV+CSS 滑动门技术的简单例子
- DIV+CSS input样式简单控制
- 利用div+css生成简单的导航菜单,简单实用
- div+css实现简单幻灯片动画
- 简洁 DIV+CSS布局入门之三 ( DIV+CSS常用 常用CSS DIV+CSS实例 简单DIV+CSS DIV+CSS布局分析 DIV+CSS流程)
- div+css+jQuery简单实现投票功能..
- DIV+CSS初学者需重视的10个简单问题与技巧
- div+css布局的应用
- JS+CSS简单实现DIV遮罩层显示隐藏【转藏】
- DIV+CSS制作二级横向弹出菜单,略简单
- CSS之通过定位简单实现div绝对居中