我在asp.net中套用美工给的html页面出了问题、用html打开很好、复制到aspx页面换了服务器控件样式就都没了
用html打开很好、一点问题都没有。复制到asp.net页面中就感觉一些css样式和布局很多都没有套用上去、CSS样式部分如下....*{margin-top:0px;m...
用html打开很好、一点问题都没有。复制到asp.net页面中就感觉一些css样式和布局很多都没有套用上去、
CSS样式部分如下....
* {
margin-top: 0px;
margin-left: 0px;
}
* { margin:0; padding:0; }
body {
font-family: "新宋体";
font-size: 12px;
line-height: 1.5;
color: #333;
height: auto;
width: 1001px;
margin-right: auto;
margin-left: auto;
}
#main {
height: auto;
width: 960px;
}
#main #top {
background-image: url(../images/topbg_02.png);
background-repeat: no-repeat;
height: 30px;
width: 960px;
line-height: 30px;
font-family: "新宋体";
font-size: 12px;
color: #333;
}
#main #top #left {
float: left;
height: 28px;
width: 500px;
}
#main #top #right {
float: right;
height: 28px;
width: 360px;
}
.top1 {
color: #F60;
margin-left: 7px;
}
.top2:link {
color: #666;
text-decoration: none;
}
html部分、、
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/mobanindex.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>无标题文档</title>
<!-- InstanceEndEditable -->
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
</head>
<body>
<form action="" method="get">
替换asp.net部分。。
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Index.aspx.cs" Inherits="Index" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
</head>
<body>
<form id="form1" runat="server">
<div id="main">
<div id="top">
<div id="left"><span class="top1">游客0001</span>您好,欢迎您的到来! <span class="top2"><a href="#" class="top2">请登录</a></span><span class="topline">|</span><span class="top2"><a href="login.html" class="top2">免费注册</a></span><span class="topline">|</span><span class="top2"><a href="#" class="top2">忘记密码</a></span></div>
<div id="right"><span class="top3"><a href="#" class="top3">购物车</a></span><span class="topline">|</span><span class="top3"><a href="#" class="top3">广告服务</a></span><span class="topline">|</span><span class="top3"><a href="#" class="top3">会员服务</a></span><span class="topline">|</span><span class="top3"><a href="index.html" class="top3">返回首页</a></span><span class="topline">|</span><span class="top3"><a href="#" class="top3">收藏我们</a></span></div>
</div>
<div id="logo-fla">
******html样式预览
急呀、、、、 有人能帮忙吗。只要能解决,多少分都行啊!! 忘高手相助、、、
问题到底出在哪里了啊! /\ 展开
CSS样式部分如下....
* {
margin-top: 0px;
margin-left: 0px;
}
* { margin:0; padding:0; }
body {
font-family: "新宋体";
font-size: 12px;
line-height: 1.5;
color: #333;
height: auto;
width: 1001px;
margin-right: auto;
margin-left: auto;
}
#main {
height: auto;
width: 960px;
}
#main #top {
background-image: url(../images/topbg_02.png);
background-repeat: no-repeat;
height: 30px;
width: 960px;
line-height: 30px;
font-family: "新宋体";
font-size: 12px;
color: #333;
}
#main #top #left {
float: left;
height: 28px;
width: 500px;
}
#main #top #right {
float: right;
height: 28px;
width: 360px;
}
.top1 {
color: #F60;
margin-left: 7px;
}
.top2:link {
color: #666;
text-decoration: none;
}
html部分、、
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/mobanindex.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>无标题文档</title>
<!-- InstanceEndEditable -->
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
</head>
<body>
<form action="" method="get">
替换asp.net部分。。
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Index.aspx.cs" Inherits="Index" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
</head>
<body>
<form id="form1" runat="server">
<div id="main">
<div id="top">
<div id="left"><span class="top1">游客0001</span>您好,欢迎您的到来! <span class="top2"><a href="#" class="top2">请登录</a></span><span class="topline">|</span><span class="top2"><a href="login.html" class="top2">免费注册</a></span><span class="topline">|</span><span class="top2"><a href="#" class="top2">忘记密码</a></span></div>
<div id="right"><span class="top3"><a href="#" class="top3">购物车</a></span><span class="topline">|</span><span class="top3"><a href="#" class="top3">广告服务</a></span><span class="topline">|</span><span class="top3"><a href="#" class="top3">会员服务</a></span><span class="topline">|</span><span class="top3"><a href="index.html" class="top3">返回首页</a></span><span class="topline">|</span><span class="top3"><a href="#" class="top3">收藏我们</a></span></div>
</div>
<div id="logo-fla">
******html样式预览
急呀、、、、 有人能帮忙吗。只要能解决,多少分都行啊!! 忘高手相助、、、
问题到底出在哪里了啊! /\ 展开
5个回答
展开全部
只要你明白html的document模型,套这东西很简单的,我建议你还是先把html的document模型整理清楚,然后在套用。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你的css文件里一些样式多没有啊,比如top3的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你的样式里面有没有中文注释???.net样式里是不允许有中文注释的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询