0

This happened recently and I don't really know what is causing this. Some pages are fine so I tried copying the codes over to those files affected and the content is pushed down, two files with same code and one of them is pushed down. I thought maybe it could be the file format so I tried changing encoding to UTF-8, UTF-8 without BOM, ANSI. Using notepad++, CodeIgniter, XAMPP 3.1.0.3.1.0.

This is what I mean http://i37.tinypic.com/2cletz.png

It should be like this http://i33.tinypic.com/2ypnpjp.png

Appears in quotation when inspecting elements in Chrome(able to delete by clicking delete node and it is becomes fine) http://i36.tinypic.com/30bhchz.png

Appears as spaces/tabs when viewing source in IE http://i37.tinypic.com/2dj76fk.png

A simple HTML code like this can cause this problem

<!DOCTYPE HTML >
<html>
<head>
<title></title>

</head>

<body link="#294052" vlink="#294052" alink="grey" font="verdana" style="width:1407px">

<div id="header" style="height:100px;width:1407px;background-color:#294052;">

<div id="img" style="float:left;">
<img src="/e-com/images/logo.jpg" style="margin-left:130%;" />
</div>
</div>
</body>
</html>
4

1 回答 1

2

删除 html-tags 之间的空格可能会解决您的问题。

其次,你有这样的css html,body { margin:0px; padding:0px }吗?这将删除页面周围的白色边框。

最后,您的示例在正文中Chrome声明了一个title标签,该标签不在代码中(注意:标题应该在 中head)。

于 2013-04-22T13:48:36.727 回答