[eluser]Volder[/eluser]
Hello,
I'm facing the following problem.
I created a small view file:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style>#topborder {height: 10px;
background-color: red;}</style>
</head>
<body>
<div id="topborder"></div>
</body>
</html>
and a simple controller for viewing it:
Code:
<?php
class Test extends Controller{
function index()
{
$this->load->view('v_test');
}
}
but when I loaded '/test' page - the red line is not on the top of the window.
So there is a space between browser's top border and my <div> element.
But the following controller works fine:
Code:
<?php
class Test extends Controller{
function index()
{
$buffer = $this->load->view('v_test','',TRUE);
echo $buffer;
}
}
as I found there is an ASCII character 239 appeared at the beginnig of the file.
So I thought about BOM, but there is only one character - not three of them.
All my files are saved as UTF-8 without BOM.
I'm using UTF-8 by default.
OS Windows XP.
Apache/2.2.9 (Win32)
PHP 5.2.6
Codeigniter 1.6.3
I read a lot of forums and still have not found a solution.
Maybe someone here has met such a probelm before?