遇到个问题:我网页的顶部是用INCLUDE导入的,但是顶部和浏览器之间会出现空白,真个INCLUDE文件下降了。如果不用INCLUDE,直接写在页面里,就是正常的。请各位大侠帮我看一下好么?多谢啦~~!
主页面代码:
<div id="all">
<div id="topinto"><!--#include file="/Skin/Skin/include/head.html"--></div>
<div id="banner">
<div class="flash">
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="360" height="46">
<param name="movie" value="/Skin/Skin/flash/word.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent">
<embed src="/Skin/Skin/flash/word.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="360" height="46"></embed>
</object>
</div>
</div>
</div>
include文件里 head.html 的代码:
<script type="text/javascript">
function Search()
{
var txts=document.getElementById("txts").value;
if(txts=="")
{
document.getElementById("txts").value="请填写内容..";
}else
{
document.forms["formSearch"].submit();
}
}
function onfocusText()
{
var txts=document.getElementById("txts").value;
if(txts=="请填写内容..")
{
document.getElementById("txts").value="";
}
}
</script>
<div id="head">
<div id="search">
<ul>
<li><img src="/Skin/Skin/images/searchpic.jpg" /></li>
<li class="inputdd"><form id="formSearch" name="formSearch" action="/count/SearchResult.aspx"><input name="txts" id="txts" type="text" class="textinput" onfocus="onfocusText()" /></form></li>
<li><img src="/Skin/Skin/images/searchbutton.jpg" onclick ="Search()" /></li>
</ul>
</div>
</div>
<div class="nav">
<ul>
<li class="navone"><a href="#"><img src="/Skin/Skin/images/nav1.jpg" alt="网站首页" /></a></li>
<li><a href="http://xcb.ecnu.edu.cn/worknews/column.shtm"><img src="/Skin/Skin/images/nav2.jpg" alt="工作动态"/></a></li>
<li><a href="http://xcb.ecnu.edu.cn/theory/column.shtm?id=理论学习"><img src="/Skin/Skin/images/nav3.jpg"alt="理论学习" /></a></li>
<li><a href="http://xcb.ecnu.edu.cn/spiritual/column.shtm""><img src="/Skin/Skin/images/nav4.jpg" alt="精神文明"/></a></li>
<li><a href="/Skin/Skin/agencies.shtm"><img src="/Skin/Skin/images/nav5.jpg" alt="机构设置"/></a></li>
<li><a href="http://xcb.ecnu.edu.cn/download/column.shtm"><img src="/Skin/Skin/images/nav6.jpg" alt="下载专区"/></a></li>
</ul>
</div>
CSS的样式:
*{ margin:0; padding:0;}
#all{width:960px;height:auto;background-color:#ffffff;margin:0 auto;border-left:1px solid #d63e31; border-right:1px solid #d63e31}
#topinto{width:960px;height:159px;margin:0;padding:0;}
#head{width:960px;height:113px; background-image:url(/Skin/Skin/images/head.jpg); background-repeat:no-repeat;}
.nav{width:960px;height:46px; background-image:url(/Skin/Skin/images/navbg.jpg); background-repeat:repeat-x;}
.nav ul{ list-style:none; margin:0px; padding:0px;}
.nav ul li{float:left;width:117px;height:46px;}
.navone{ margin-left:130px;}
#banner{width:960px;height:155px; background-image:url(/Skin/Skin/images/banner.jpg); background-repeat:no-repeat;}
.flash{float:left;width:360px;height:46px; margin-top:58px;margin-left:28px;}
#search{float:right;width:192px;height:20px; margin-right:15px; margin-top:66px;}
#search ul{width:192px;height:20px; list-style:none; margin:0px; padding:0px; overflow:hidden;}
#search ul li{float:left; display:block;}
.textinput{width:104px;height:18px; border:1px solid #e6e6e6; color:#666;}
.inputdd{width:104px;}
解决方法
在DW中单独打开那个包含文件,然后按Ctrl+J。
选择“标题编码”,在出来的界面中,取消那个“包含 Unicode 签名 BOM”,然后再试试。
Word教程网 | Excel教程网 | Dreamweaver教程网 | Fireworks教程网 | PPT教程网 | FLASH教程网 | PS教程网 |
HTML教程网 | DIV CSS教程网 | FLASH AS教程网 | ACCESS教程网 | SQL SERVER教程网 | C语言教程网 | JAVASCRIPT教程网 |
ASP教程网 | ASP.NET教程网 | CorelDraw教程网 |