#1 qiuxiongfu
为什么在DW中IE直接测试index.html,css正常运行。一运行index.php css就不正常了!
index.html 的 css插入代码:
main 的代码:
class main extends spController
{
function index(){ // 这里是首页
$tpl = $this->spArgs("tpl"); // 这里接收tpl参数,使得模板变化
$bestbook = spClass("bestbook");
$this->results = $bestbook->findAll();
$this->display("{$tpl}/index.html");
}
还有Smarty开启了!
有谁帮忙看看!!:handshake
2011-08-16 17:35:46
#2 jake
除了路径问题,还有可能是文件bom的问题,清理一下bestbook.php文件的bom吧
http://www.speedphp.com/framework-utf8.html
2011-08-16 20:22:42
#3 qiuxiongfu
回复 2 jake 先谢谢
jake,:victory:
是我表达不清楚,不是UTF8编码问题。是
不能居中不能问题:dizzy:
2011-08-17 10:00:06
#4 霸气千秋
回复 3 qiuxiongfu 建议使用这种居中,
2011-08-17 10:45:50
#5 qiuxiongfu
回复 4 霸气千秋 我的css居中:
header {
padding: 0px;
width: 980px;
float: none;
margin-top: 0;
margin-right: auto;
margin-bottom: 0;
margin-left: auto;
}
这样也不行!
2011-08-17 11:12:06
#6 jake
文件中如果有bom,也会导致div不能居中的,建议是先清除bom,再找问题。
2011-08-17 12:22:09
#7 qiuxiongfu
已经清除bom 了
2011-08-17 13:18:16
#8 jake
用fire 看看,还有IE8的调试器也可以查看。
2011-08-17 17:11:12
#9 qiuxiongfu
用fire,和Google 浏览器都正常居中。IE7不能居中:L
2011-08-17 17:24:51
#10 jake
sp网站也是用下面的css来居中
home{margin-left:auto;margin-right:auto;width:1000px;}
2011-08-17 17:30:13