Welcome Guest, Not a member yet? Register   Sign In
[Solved] Content from <Head> is inserted in <Body>. Why?
#1

[eluser]Zefirs[/eluser]
Hello, I hope you guys could help me (newbie), I have this weird problem.

Here is the example view.php code->
Code:
<html>
<head>
<link rel="stylesheet" type="text/css" href="/css/test.css" />
</head>
<body>
This is content!
</body>
</html>

When I inspect element in Firefox or Chrome or .. code is ->

Code:
<html>
<head>

</head>
<body>
<link rel="stylesheet" type="text/css" href="/css/test.css" />
body{
color:red;
} </link>
This is content!
</body>
</html>

Why link or script parts are transfered in <body>? Only meta tag stays in head
tag..

Solution! The cause - Im using notepad++ , default encoding is ASNI, but I needed UTF-8,I realized that when half php file was written already. I converted it to UTF-8, and then it happened. CSS from <HEAD> jumped in <BODY>, and other crazy things started.

Do not convert encoding in Notepad++ if file is containing any information, use other editor than notepad++ to convert encodings ANSI -> UTF-8.


Sorry for my bad English.


Messages In This Thread
[Solved] Content from <Head> is inserted in <Body>. Why? - by El Forum - 01-21-2011, 01:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB