编程论坛
注册
登录
编程论坛
→
WEB前端(UI)
页面框架图片太窄了,浏览的时候全跑左边来了
_断肠人_
发布于 2008-11-25 04:15, 1818 次点击
页面框架图片太窄了,浏览的时候全跑左边来了,把内容把加一个div然后加个align=center不巧里面的全有元素都跑中间来了,高手指点
7 回复
#2
kai
2008-11-25 09:30
你不贴代码怎么来帮你解决啊?
#3
谁与争疯
2008-11-25 20:44
好歹你也截一个DW的设计图来啊,你用成品的浏览,我连你的布局都不知道。
#4
huangyong
2008-11-25 21:39
贴代码才能解决问题
#5
_断肠人_
2008-11-26 15:55
<html xmlns="http://www.
<head id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>管理员</title>
<style type="text/css">
<!--
body {
background-image: url(Images/di-admini2.gif);
background-repeat: no-repeat;
}
#Layer5 {
position:absolute;
left:22px;
top:87px;
width:144px;
height:21px;
z-index:1;
}
.STYLE1 {
font-family: "宋体";
font-size: 12px;
color: #FFFFFF;
}
a:link {
color: #000000;
}
a:visited {
color: #000099;
}
a:hover {
color: #000000;
}
a:active {
color: #000000;
}
#Layer6 {
position:absolute;
left:22px;
top:120px;
width:145px;
height:281px;
z-index:2;
}
#Layer8 {
position:absolute;
left:228px;
top:91px;
width:520px;
height:16px;
z-index:4;
}
.STYLE3 {font-family: "宋体"; font-size: 12px; font-weight: bold; }
#Layer19 {
position:absolute;
left:7px;
top:9px;
width:156px;
height:59px;
z-index:14;
}
#Layer20 {
position:absolute;
left:210px;
top:113px;
width:736px;
height:606px;
z-index:15;
}
-->
</style>
</head>
<body>
<form id="Form1" runat="server">
<div id="Layer5">
<div align="right" class="STYLE1">管理员,您好!</div>
</div>
<div id="Layer6" style="font-size:small">
<asp:TreeView ID="tvAdmin" runat="server" DataSourceID="XmlDataSource1" ImageSet="Contacts" NodeIndent="10">
<DataBindings>
<asp:TreeNodeBinding DataMember="SiteMapNote" NavigateUrlField="url" TextField="title" />
</DataBindings>
<ParentNodeStyle Font-Bold="True" ForeColor="#5555DD" />
<HoverNodeStyle Font-Underline="False" />
<SelectedNodeStyle Font-Underline="True" HorizontalPadding="0px"
VerticalPadding="0px" />
<NodeStyle Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" HorizontalPadding="5px"
NodeSpacing="0px" VerticalPadding="0px" />
</asp:TreeView>
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/Admin/AdminTreeView.xml">
</asp:XmlDataSource>
</div>
<div id="Layer20">
<asp:contentplaceholder id="cphContent" runat="server">
</asp:contentplaceholder>
</div>
<div id="Layer8">
<div class="STYLE3" id="__breadcrumb">
您现在的位置: </div>
</div>
<img src="Images/touming.gif" width="126" height="61" border="0" usemap="#Map" style="left: -5px; position: relative; top: 0px" />
</form>
</body>
</html>
#6
_断肠人_
2008-11-26 15:57
麻烦看下
#7
kai
2008-11-26 16:26
你现在这个代码不行,我现在在更改你的字体颜色后只看到两行字,然后就是右上角一个小框框,别的什么都没有。
#8
gupiao175
2010-03-31 19:19
图片和你发的代码根本不是一回事,要想多层定位中间,可以在主层,一般为contain层里设置一个margin:0px auto;属性,其他一切层包含在这个层里,这样不管如何,整体显示都是居中的!关键是垂直距离不好控制!
1