CSS related

自己设计的第一个页面样式表,比较简陋~


#loginbox{
width: 300px;
padding: 30px;
margin: 100px auto;
background: lightgray;
border: 3px solid green;
}

#container{
width:"90%";
margin:0 auto;/*margin--边界,上下为0,左�自动*/
}

#header{
width:90%;
height:20px;
margin:0 auto;/*margin--边界,上下为0,左�自动*/
background:lightgray;
}

#middle{
width:90%;
height:600px;
margin:0 auto; /*margin--边界,上下为0,左�自动*/
overflow:hidden; /*防止div被撑开,超过div大�就��*/
background:white;
}

#menu{
width:15%;
height:600px;
float:left;
margin:0 auto; /*margin--边界,上下为0,左�自动*/
overflow:hidden; /*防止div被撑开,超过div大�就��*/
background: gray;
}

#main{
width:75%;
height:600px;
float:right;
margin:0 auto; /*margin--边界,上下为0,左�自动*/
overflow:hidden; /*防止div被撑开,超过div大�就��*/
background:white;
}

#footer{
width:90%;
height:20px;
margin:0 auto;/*margin--边界,上下为0,左�自动*/
background:lightgray;
}


<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page info="This is a text infomation"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<link rel="stylesheet" href="./css/layout.css">
</head>
<body>
<div id="header" align="right">
<span><a href="<%=request.getContextPath() %>/toLogin.action">登录 </a></span>
<span> | </span>
<span><a href="<%=request.getContextPath() %>/toRegister.action"> 免费注册</a></span>
</div>

<div align="center" id="loginbox">
<s:form action="login" method="post" >
<s:textfield name="user.username" label="username"></s:textfield>
<s:password name="user.password" label="password"></s:password>
<s:submit></s:submit>
</s:form>
</div>


</body>
</html>


<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<link rel="stylesheet" href="./css/layout.css">
</head>
<body>

<div id="container">
<div id="header" align="right">
<span style="color:lightgreen">Welcome ${loginUser} </span>
<span> | </span>
<span><a href="<%=request.getContextPath() %>/logout.action">安全退出</a></span>
</div>
<div id="middle">
<div align="left" id="menu">
<br><br><br>
<a href="<%=request.getContextPath() %>/newPublishedProjects.action">最新项目</a><br>
<a href="<%=request.getContextPath() %>/newDealProjects.action">近期成交项目</a><br>
<a href="<%=request.getContextPath() %>/toPublishProjects.action">发布项目</a><br>
<a href="<%=request.getContextPath() %>/myPublishedProjects.action">我发布的所有项目</a><br>
<a href="<%=request.getContextPath() %>/myRequestProjects.action">我承接的所有项目</a><br>
</div>
<div align="left" id="main">
<span style="color:blue">最新项目 </span> <span style="color:gray">近期成交项目</span>
<table width="100%">
<tr><th width="30%">项目名称</th><th width="20%">啊十大</th><th width="10%">啊十大</th><th width="10%">阿萨</th><th width="30%">啊十大市场</th></tr>
<tr><td><a href="<%=request.getContextPath() %>/toRequest.action">pro1</a></td><td>1</td><td>1</td><td>1</td><td>1</td></tr>
<tr><td><a href="<%=request.getContextPath() %>/toRequest.action">pro1</a></td><td>2</td><td>2</td><td>2</td><td>2</td></tr>
</table>
</div>
</div>
<div id="footer" align="right">@copyright XXX company.</div>
</div>

</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值