Html struts2项目布局页面出现不需要的边框
我正在开发一个struts 2项目,其中布局页面在其上创建了一个不需要的边框。我试图通过将填充和边框设置为0px来删除它。但它还是来了Html struts2项目布局页面出现不需要的边框,html,css,jsp,struts2,tiles,Html,Css,Jsp,Struts2,Tiles,我正在开发一个struts 2项目,其中布局页面在其上创建了一个不需要的边框。我试图通过将填充和边框设置为0px来删除它。但它还是来了 <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<!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><tiles:insertAttribute name="title" ignore="true" /></title>
<%-- Internal style elements --%>
<style type="text/css">
.basestyle { /*style which is given for the main DIV which includes entire base layout body */
width: 100%;
height: 100%;
padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;
}
.headstyle { /* style which is given for the DIV which includes header part */
margin:0px;
width: 100%;
height: 10%;
vertical-align: middle;
text-align: center;
background-color: #476D9E;
padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;
}
.vericalscroll { /* style which is given for the DIV which includes vertical menu part */
overflow-y:auto; overflow-x:hidden;
height:100%;
width:153px;
background-color: #476D9E;
vertical-align:top;
margin-right:1px;
padding-right:5px;
}
.bodystyle { /* style which is given for the DIV which includes body part */
padding: 0px,0px,0px,0px;
border-bottom:0px;
border-left:0px;
border-right:0px;
border-top:1px #DBDFEC;
font-family: Calibri;
font-weight: lighter;
height:565px;
overflow-y: auto;
overflow-x: auto;
width:100%;
/*text-align: center;*/
}
.footstyle { /* style which is given for the DIV which includes footer part */
width: 100%;
background-color: #476D9E;
height: 10px;
bgcolor:#eeeeee;
vertical-align: middle;
text-align: center;
padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;
}
</style>
</head>
<body >
<div class="basestyle" >
<div class="headstyle" >
<tiles:insertAttribute name="header" /> <%-- including header --%>
</div>
<table border="0" width=100% height=87% style="margin: 0px; padding: 0px;">
<tr>
<td width=153 align="left" valign="top">
<div class="vericalscroll" >
<tiles:insertAttribute name="menu" /> <%-- including menu --%>
</div> </td>
<td valign="top" align="left" width=88% >
<div class="bodystyle" align="center" >
<tiles:insertAttribute name="body" /> <%-- including body --%>
</div> </td>
</tr>
</table>
<div class="footstyle" >
<tiles:insertAttribute name="footer" /> <%-- including footer --%>
</div>
</div>
</body>
</html>
.basestyle{/*为包含整个基本布局主体的主DIV提供的样式*/
宽度:100%;
身高:100%;
填充:0px 0px 0px 0px;边距:0px 0px 0px 0px;
}
.headstyle{/*样式,为包含标题部分的DIV提供*/
边际:0px;
宽度:100%;
身高:10%;
垂直对齐:中间对齐;
文本对齐:居中;
背景色:#476D9E;
填充:0px 0px 0px 0px;边距:0px 0px 0px 0px;
}
.vericalscroll{/*样式,为包含垂直菜单部分的DIV提供*/
溢出-y:自动;溢出-x:隐藏;
身高:100%;
宽度:153px;
背景色:#476D9E;
垂直对齐:顶部;
右边距:1px;
右侧填充:5px;
}
.bodystyle{/*样式,该样式是为包含车身部件的DIV提供的*/
填充:0px,0px,0px,0px;
边框底部:0px;
左边框:0px;
右边框:0px;
边框顶部:1px#DBDFEC;
字体系列:Calibri;
字体重量:较轻;
身高:565px;
溢出y:自动;
溢出-x:自动;
宽度:100%;
/*文本对齐:居中*/
}
.footstyle{/*为包含页脚部分的DIV指定的样式*/
宽度:100%;
背景色:#476D9E;
高度:10px;
bgcolor:#eeeeee;
垂直对齐:中间对齐;
文本对齐:居中;
填充:0px 0px 0px 0px;边距:0px 0px 0px 0px;
}
红色背景用于识别身体部位
从.bodystyle中删除“border top:1px#DBDFEC”,甚至代替.bodystyle中的所有边框,只需写border:none
尽管我无法在您的附加图像中看到边框。在
平铺标签中添加此选项。
theme=“css\u xhtml”
。然后,它将被简单地视为视图中的HTML标记。不确定是否使用平铺,但您使用的是哪个主题?即使没有任何主题(仅在添加了本身包含空白内容的组件之后),它也会显示边框。在我创建的所有布局中,它都显示了边框。即使在下载的1中,您也可以看到红色飘浮在页眉和页脚之外,而这两个边在这里?{}负责边界的标记中没有。可能在这里,也可能在这里,我从来没有使用过tiles,但是为了获得图像,我是如何通过删除那些插入属性行来创建页面的。但也有明显的边界。