<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'layer_demo.jsp' starting page</title>
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
/*基本信息*/
body{
font:12px Tahoma;
margin:0px;
text-align:center;
background:#FFF;
}
/*页面层容器*/
#container {
width:100%;
margin: 10px auto;
min-width: 500px;
min-height: 300px;
}
/*页面头部*/
#Header {
width:950px;
margin:0 auto;
background:#FFCC99;
background:url('<%=basePath%>images/logo.jpg') no-repeat;
}
#menu{
padding: 20px 20px 0 0;/*固定菜单的位置*/
}
#menu ul{
float:right;/*使菜单位于页面右侧*/
list-style: none;
margin: 0px;
}
#menu ul li{
float: left;/*列表显示在一行*/
margin: 0 10px;/*让列与列之间产生20px距离*/
display:block;
line-height: 28px;/*确保文字在行中间与分割线保持平衡*/
}
/*竖线*/
.menuDiv {width:1px;height:28px;background:#999}
#menu ul li a:link ,#menu ul li a:visited{
font-size: 12px;
text-decoration: none;
font-weight: bold;
color: #666;
}
#menu ul li a:hover{}
#banner {
background:url('<%=basePath%>images/banner.jpg') repeat-x; /*加入背景图片*/
clear:both; /*清除浮动*/
height:10px;
}
/*页面主体*/
#PageBody{
width:950px;
margin:0 auto;
height:500px;
background:#CCFF00;
}
#sidebar{
width:160px; /*设定宽度*/
height:500px;
text-align:center; /*文字左对齐*/
float:left; /*浮动居左*/
clear:left; /*不允许左侧存在浮动*/
overflow:hidden; /*超出宽度部分隐藏*/
border-right: 1px solid red;
}
#mainbody {
width:789px;
height:500px;
text-align:left;
float:right; /*浮动居右*/
clear:right; /*不允许右侧存在浮动*/
overflow:hidden ;
}
/*页面底部*/
#Footer {
width:950px;
margin:0 auto;
height:50px;
background:#00FFFF;
padding-top: 20px;
}
</style>
</head>
<body>
<div id="container">
<div id="header">
<div id="menu">
<ul>
<li><a href="#">首页</a></li>
<li class="menuDiv"></li>
<li><a href="#">博客</a></li>
<li class="menuDiv"></li>
<li><a href="#">设计</a></li>
<li class="menuDiv"></li>
<li><a href="#">相册</a></li>
<li class="menuDiv"></li>
<li><a href="#">论坛</a></li>
<li class="menuDiv"></li>
<li><a href="#">关于</a></li>
</ul>
</div>
<div id="banner"></div>
</div>
<div id="pagebody">
<div id="sidebar">bottom_left</div>
<div id="mainbody">bottom_right</div>
</div>
<div id="footer"><hr size="2">
[email protected]</div>
</div>
</body>
</html>