在DW MX2004里做了个页面,是aspx的,使用了CSS样式文件,在DW使用浏览器预览可以正常显示效果,移到VS.NET里预览却显示不出效果,用浏览器直接输入地址也显示不正常,请问是什么原因?
以下是aspx的源码:
<%@ Page Language="c#" ContentType="text/html" ResponseEncoding="utf-8" CodeBehind="index2.aspx.cs" AutoEventWireup="false" Inherits="empty.index2" %>
<!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">
<link href="style/style2.css" rel="stylesheet" type="text/css"></link>
<title>无标题文档</title>
</head>
<body>
<div id="header">
<img class=".logo" src="style/logo.jpg" />
<img class=".advertise" src=""/>
</div>
<div id="main">
<div id="left">左边
<div id="menu">菜单栏
<ul>
<li class="submenu">子菜单</li>
<li class="submenu">子菜单</li>
</ul>
</div>
</div>
<div id="right">
<div id="content">
<div id="tabletitle">表头</div>
<div id="table">表格</div>
</div>
</div>
</div>
<div id="footer">footer</div>
</body>
</html>
还有CSS的代码:
#header {
background-image: url(bg.jpg);
background-repeat: repeat;
border: thin solid #408080;
position: absolute;
display: inline;
width: 100%;
height: 90px;
background-position: center center;
vertical-align: middle;
}
#main {
border: thin double #408080;
position: relative;
top: 100px;
padding: 10px;
width: 100%;
}
#header .logo {
float: left;
position: relative;
left: 5px;
top: 5px;
}
#header .advertise {
float: right;
position: relative;
left: 100px;
}
#left {
background-color: #D9FFD9;
border: thin solid #00CCFF;
top: 10px;
right: 5px;
bottom: 10px;
width: 150px;
padding: 10px;
margin: 10px;
background-position: left top;
left: 5px;
float: left;
}
#right {
background-color: #F9DEC1;
position: relative;
padding: 10px;
top: 10px;
bottom: 10px;
width: auto;
right: 15px;
margin: 10px;
left: 5px;
background-position: center center;
}
#content {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
background-color: #FFFFFF;
text-align: center;
vertical-align: top;
padding: 10px;
width: auto;
position: relative;
margin: 10px;
left: 10px;
top: 10px;
right: 10px;
bottom: 10px;
}
#tabletitle {
font-size: 14px;
font-weight: bold;
color: #000099;
border-bottom-width: thin;
border-bottom-style: ridge;
border-bottom-color: #000099;
width: 80%;
line-height: 20px;
}
#table {
line-height: 14px;
width: 80%;
border: thin dotted #CDCDCD;
padding: 5px;
margin: 10px;
}
#footer {
font-size: 12px;
font-style: italic;
line-height: 18px;
color: #000066;
margin: 15px;
padding: 15px;
position: relative;
top: 100px;
background-color: #D4D0C8;
background-image: url(bg.jpg);
text-align: center;
}