着急,谁能帮我调一下,关于css的问题
做了一个页面,很奇怪的是页面顶部总有一个空行无法去掉,页面编码是utf-8的,分为两个文件,一个1.html,一个main.css,请高手帮忙调试一下,去掉上面的空行,代码如下:
////////////////////////////
1.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 ">
<head>
<title> 汽车大全 </title>
<meta http-equiv= "Content-Type " content= "text/html; charset=utf-8 " />
<link href= "main.css " rel= "stylesheet " type= "text/css " />
</head>
<body>
 <script language= "JavaScript " type= "text/javascript ">
function search_to_brand()
{
document.form_search.search_submit.value= "搜索品牌 ";
}
function search_to_group()
{
document.form_search.search_submit.value= "搜索团购 ";
}
function search_to_dealer()
{
document.form_search.search_submit.value= "搜索经销商 ";
}
</script>
<div class= "top ">
<table width= "100% " height= "107 " border= "0 " cellspacing= "0 " bgcolor= "#04477c ">
<tr>
<td width= "280 " bgcolor= "#04477c "> <span class= "f12_white_cu "> 汽车大全 </span> </td>
<td align= "right " valign= "middle " bgcolor= "#04477c "> <span class= "f12_white_cu "> <a class= "one " href= "# "> 首页 </a> | <a class= "one " href= "# "> 团购 </a> | <a class= "one " href= "# "> 车型大全 </a> | <a class= "one " href= "# "> 登陆 </a> | <a class= "one " href= "# "> 一分钟注册 </a> </span> </td>
</tr>
<tr>
<td bgcolor= "#f0f0f0 "> <img src= "images/logo.gif "/> </td>
<td bgcolor= "#f0f0f0 "> <a href= "# " onclick= "search_to_brand() "> 品牌车型 </a> | <a href= "# " onclick= "search_to_group() "> 团购 </a> | <a href= "# " onclick= "search_to_dealer() "> 经销商 </a>
<form name= "form_search " method= "post " action= " ">
<label>
<input type= "text " name= "textfield " style= "width:180px;font: '宋体 ';font-size:12px; vertical-align:middle " />
</label>
省份
<label>
<select name= "select " style= "font: '宋体 ';font-size:12px; vertical-align:middle ">
<option> 全国 </option>
<option> 江苏省 </option>
</select>
</label>
城市
<label>
<select name= "select2 " style= "font: '宋体 ';font-size:12px; vertical-align:middle ">
<option> 南京 </option>
</select>
</label>
<label>
<input class= "search_button " type= "submit " name= "search_submit " value= "搜索品牌 " style= "width:80px; vertical-align:middle "/>
</label>
</form> </td>
</tr>
</table>
</div>
这是模板
<div class= "div_buttom ">
<div class= "text_simple " align= "center ">
版权所有 <a href= "http://www.che365.com "> 汽车大全 </a> 2007
</div>
</div> </body>
</html>
////////////////////////////
main.css
////////////////////////////
BODY {
top: 0px;
margin: 0px;
}
FORM {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px;}
.top {
font-family: "宋体 ";
font-size: 12px;
border-bottom-style: dashed;
border-bottom-color: #666666;
border-bottom-width: 1px;
margin-bottom: auto;
margin-top: 0px;
}
A:link {COLOR: #336699;text-decoration: none;}
A:visited {COLOR: #336699;text-decoration: none;}
A:hover {BACKGROUND: #003399; COLOR: #ffffff; TEXT-DECORATION: none;text-decoration: none}
A:active {BACKGROUND: #ff9933; COLOR: #ffffff; TEXT-DECORATION: none;text-decoration: none;}
A IMG {BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px}
A.one:link {
COLOR: #FFFFFF;
text-decoration: none;
font-family: "宋体 ";
}
A.one:visited {
COLOR: #FFFFFF;
text-decoration: none;
font-family: "宋体 ";
}
A.one:hover {BACKGROUND: #003399; COLOR: #ffffff; TEXT-DECORATION: none;text-decoration: none}
A.one:active {BACKGROUND: #ff9933; COLOR: #ffffff; TEXT-DECORATION: none;text-decoration: none;}
A.one IMG {BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px}
.searchform {
background-color: #D6E9FC;
height: 50px;
width: 600px;
border-bottom-width: 1px;
margin-bottom: 1px;
border-top-width: 1px;
margin-top:1px;
font-family: "宋体 ";
font-size: 12px;
top: 1px;
}
.search_button {
font-family: "宋体 ";
font-size: 12px;
height: 25px;
width: 80px;
}
.div_buttom {
padding-bottom: 0px;
border-top-width: 1px;
border-top-style: dashed;
border-top-color: #666666;
}
.f12_white_cu {
font-family: "宋体 ";
color: #FFFFFF;
}
.text_simple {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
[解决办法]
<body>
<script language= "JavaScript " type= "text/javascript ">
拷入DW的时候
之间有一个字符,删去即可