开发者

XML not allowed at start of document

开发者 https://www.devze.com 2023-01-13 11:06 出处:网络
i am getting this error on this code: <style> #tt { position:absolute; display:block; background:url(images/tt_left.gif) top left no-repeat;

i am getting this error on this code:

<style>
#tt {
 position:absolute;
 display:block;
 background:url(images/tt_left.gif) top left no-repeat;
 }
 #tttop {
 display:block;
 height:5px;
 margin-left:5px;
 background:url(images/tt_top.gif) top right no-repea开发者_高级运维t;
 overflow:hidden;
 }
 #ttcont {
 display:block;
 padding:2px 12px 3px 7px;
 margin-left:5px;
 background:#666;
 color:#fff;
 }
#ttbot {
display:block;
height:5px;
margin-left:5px;
background:url(images/tt_bottom.gif) top right no-repeat;
overflow:hidden;
}
</style>

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

does anyone know why i am getting this error? where should i be pasting the style?


The XML declaration…

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

…, if included, must be the very first thing in the document. You have it appearing after a style element.

That said, version 1.0 is the default, UTF-8 is the default, and no is the default. So you can leave it out entirely.

What's more, assuming you are writing XHTML and serving it as text/html, you should leave it out entirely, as per the first of the compatibility guidelines.

where should i be pasting the style?

A style element can only appear in an XHTML 1.0 document as a child element of the head element.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号