TUF8编码网页头部10像素空白如何解决?用UE编辑器去掉UTF8的bom也不行头部还是 有10像素的空白!高了2天了  苦闷!神啊,救救我吧!

解决方案 »

  1.   

    你这个文件要以UTF-8 无BOM 格式编码保存。
      

  2.   

    我是以UTF-8 无BOM 格式编码保存,问题是网页上那段空白还在 ,我晕了!。
      

  3.   

    是UTF-8不是UTF8也不是TUF8!
    (1)查看源文件发现头部有一大段空白,那一定是你前面已经有输出了
    (2)查看源文件,发现头部没有空白,但是网页上预览到的有空白,是样式问题。margin:0
      

  4.   

    <!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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title><link rel="stylesheet" href="/style/reset.css?ver=1" />
    <link rel="stylesheet" href="/style/all.css?ver=1.0.1" />
    <link rel="stylesheet" href="/style/jquery.treeview.css" />
    <link rel="stylesheet" href="/style/innerpage.css?ver=1" />
    <link rel="stylesheet" href="/style/extend.css?ver=1" />
    <script type="text/ecmascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script type="text/ecmascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script><script type="text/ecmascript" src="/includes/js/extend-prototype.js"></script>
    <script type="text/ecmascript" src="/includes/js/stage.js?ver=1"></script></head><body>
    <div id="outer_wrapper">
         <div id="header">
             <div id="web_top">
                 
                </div>
                <div id="web_logo">             <img src="/resources/images/web_logo.jpg"  />
                </div>
                <div id="top_ban">
                 <img src="/resources/images/top_banner.jpg" alt="" />
                </div>
                <div id="top_nav">
                 <b class="left_orna"></b>
                 <b class="right_orna"></b>
                    <ul class="nav">                 <li class="first"><a href="/"></a></li>
                  
                     <li><a href="#"></a></li>
                     <li><a href="#"></a></li>
                    </ul>
                    <script type="text/ecmascript">/*<![CDATA[*/setTimeout(setCurrent,100)/*]]>*/</script>
                </div>
    </div>
            <div id="content">            <div id="top_slider">
                    <div id="slide_placeholder" style="height: 200px"></div>
                    <script type="text/ecmascript">/*<![CDATA[*/swfobject.embedSWF("/resources/animations/slide.swf", "slide_placeholder", "960", "200", "10.0.0", null, {config: '6|0xFFFFFF|0x1102da|0xFFFFFF|0x62c3fa|0x3e62ff', bcastr_flie: '/resources/images/slide/1.jpg|/resources/images/slide/2.jpg|/resources/images/slide/3.jpg|/resources/images/slide/4.jpg', bcastr_link: '/content/pressroom/School.asp|/content/pressroom/article.asp?id=1059|/content/profession/highereducation.asp', bcastr_title: ''}, {wmode: 'opaque'}, null);/*]]>*/</script>
                </div>

    </div>
    </div>
    </body>
    </html>
      

  5.   

    <body STYLE="margin:0;">
      

  6.   

    CSS样式里有写  <body STYLE="margin:0;">
      

  7.   


    <body style="margin:0;padding:0;width:100%">
      

  8.   

    我一直都在用utf-8做東西,怎麼沒出現你所說的問題呢
    文件要保存成utf8
    另外head頭也要加utf8才行
    至於你所說的10px空白,這應該是css控制的問題吧
    如果是css你就加margin:0;padding:0;
      

  9.   

    空白跟编码格式没关系   如果你觉得是该问题  都转成字符编码看看  应该还是有空白的!
    检查一下你的样式  body不建议设置属性  默认就行了  问题应该不在这里  即使你加上了margin也没用  margin适用于盒子模型的  body以为好像应该没有盒子模型了  白话就是网页的最外框就是body 除非你再body外再加一个框子(div)这样你的body才能用margin  
    不过具体你的问题我还没看清 个人感觉你的问题方向错了
    以上纯属个人感觉  我也是新人  如果有对之处  请指出  共勉之!
      

  10.   

    <!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>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    </head><body>
    <div style=" height:200px; border:1px #FF0000 solid">
    fdddd 
    </div>
    </body>
    </html>
    奇怪 在DW里新建一个 就这么一个纯HTML的居然还自动换行个10像素的空白!
      

  11.   

    看了 单页面可以   单UTF-8可以 用PHP引入就有了 我服了!
      

  12.   

    你怎么做的php引入?直接打开php文件?
      

  13.   

    看来是新手,你要设置css样式才行的,
    <!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>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    <style>
    body{margin:0px; padding:0px; font-size:12px;}
    </style>
    </head><body>
    <div style=" height:200px; border:1px #FF0000 solid">
    fdddd 
    </div>
    </body>
    </html>
      

  14.   

    另外PS一下,好像没有见过什么TUF8编码,也没有UTF8编码,只有 utf-8 编码。南方学院
      

  15.   

    重建文件utf-8格式,,,复制代码,,保存。
      

  16.   

    Reset CSShttp://meyerweb.com/eric/tools/css/reset/