没使用smarty时  直接用火狐和ie6(和ie8)直接浏览html正常 通过smarty 后(display加载页面) 火狐下正常,ie6和ie8都往左偏 怎么回事啊

解决方案 »

  1.   

    样式没问题,专门写几个div测试了下 还是那样 而且如果样式有问题 为什么直接浏览和用smarty后通过火狐浏览都正常 就用smarty后通过ie测试时不正常(通过ie直接访问也正常)
      

  2.   

    1、检查是否是 BOM 的原因
    2、检查样式表文件的位置(因火狐下正常,出错的可能行不大)
      

  3.   

    BOM?这个如何检查呢 我用的dreamweaver
      

  4.   

    你的程序是utf-8编码吗? 如果是就有可能受bom头的影响。用notepad++另存一下。以utf-8无BOM格式编码保存。
      

  5.   

    <!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>
    </head>
    <style>
    body{
    margin:0;
    padding:0;
    }
    .top{
    margin:0 auto;
    width:980px;
    height:100px;
    background-color:#F00;}
    .ment ul{

    margin:0 auto;
    width:980px;
    height:100px;
    }
    .ment ul li{

    margin:0;
    width:245px;
    height:100%;
    list-style:none;
    float:left;
    }
    #c1{
    background-color:#000;
    }
    #c2{
    background-color:#999;}
    #c3{
    background-color:#903;
    }
    #c4{
    background-color:#00F;
    }
    </style>
    <body>
    <div class="top"></div>
    <div class="ment">
    <ul>
    <li id="c1"></li>
    <li id="c2"></li>
    <li id="c3"></li>
    <li id="c4"></li>
    </ul>
    </div>
    </body>
    </html>
    以上是源代码 正在使用的朋友帮忙看下 是不是都偏左了  正常是剧中的
      

  6.   

    ie6 正常
    360chrome ment 偏右
      

  7.   

    ie8/firefox/chrome效果一样。没有ie6.。等其他朋友测试。
      

  8.   

    楼上的2位朋友 你们是通过smarty后访问的吗 ?直接打开是正常的 但是通过smarty的display后就不正常了
      

  9.   

    你用的什么编辑器?smarty是哪个版本的??
      

  10.   

    notepad++   版本是2.6.26 
      

  11.   

    能发下在ie下的截图吗? 我的ie6,smarty版本 3.16  
      

  12.   

    能发下在ie下的截图吗? 我的ie6,smarty版本 3.16 
      

  13.   

    没有ie6环境。但在ie8中没发现有问题。
      

  14.   

    如果ie8/firefox/chrome没问题,而ie6下有问题。则说明跟编码无关。你需要调调你的css使之兼容ie6了。