0

Not sure entirely what is happening, but I get the following errors from Internet Explorer and Google Chrome...yet it displays perfectly in Opera >_>

Google

This XML file does not appear to have any style information associated with it. The document tree is shown below.

IE

IE renders the page but doesn't apply ANY of the tags and just displays the text >_>

Code

XHTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<!-- This is a redesign of my redesign -->
<html>
    <head>
         <title>Hello</title>
         <link rel="stylesheet" type="text/css" href="css/fonts.css" />
         <link rel="stylesheet" type="text/css" href="css/main.css" />
         <link rel="stylesheet" type="text/css" href="css/container.css"/>
         <link rel="stylesheet" type="text/css" href="css/banner.css" />
    </head>
    <body>
        <div id="Container">
            <div id="Banner"></div>
            <div id="Content"><p>Hello World</p></div>
        </div>
    </body>
</html>

CSS Example

@charset “UTF-8?";
/*CSS for the Container and non div items*/
#Container {
    width: 80%;
    min-height: 600px;
    max-height: 1200px;
    margin: 0 auto;
    margin-top: 1%;
    z-index: 0;
}
#Content {
    position: relative;
    width: 100%;        
    min-height: 70%;
    height: 80%;
    max-height: 80%;
    background-color: red;
    z-index: 2;
    border-style: solid;
    border-left-width: 1px;
    border-right-width: 1px;
    border-color: black;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

What gives O_o

Ravenshade
  • 109
  • 3
  • 9
  • 1
    FYI, 1) XHTML 1.1 is a dormant standard 2) The full stop in English is ".", not ">_>", and the question mark is "?", not "O_o". – BoltClock Feb 17 '12 at 12:13
  • Grammar Nazi alert!!!!! But XHTML according to w3c is the future for HTML4... – Ravenshade Feb 17 '12 at 12:20
  • 1
    It *was* about 10 years ago, but HTML5 is the cool new thing now. – BoltClock Feb 17 '12 at 12:21
  • http://webdesign.about.com/b/2009/07/06/goodbye-xhtml-hello-html-5.htm apparently the w3c need to update their 'preferred doctypes' >_> <_<. *happy?* – Ravenshade Feb 17 '12 at 12:23
  • Did you try changing the doctype to HTML5? (See, how I used the question mark there?) – Alex Morales Feb 17 '12 at 12:27
  • @BoldClock Most browsers support XHTML now, even IE. So it's a de facto standard! And yes, HTML is the new rage now, but not everybody wants to partake in the new rage. Some of us like to wait in the sidelines until the insanity blows over. – Mr Lister Feb 17 '12 at 12:29

2 Answers2

2

An XHTML file MUST have the xmlns attribute xmlns="http://www.w3.org/1999/xhtml" in its html start tag or it will not be recognised as XHTML.

Opera's behaviour is non-standard.

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
  • That's interesting. I never had a page give me any issues when I didn't include that. – Alex Morales Feb 17 '12 at 12:39
  • That...would indeed cover it O_O thank you muchly. Although slightly irrelevant due to my recent discovery that XHTML1.1 is 'not' the way forwards ._.; That won't stop me looking for XHTML5 though n_n. – Ravenshade Feb 17 '12 at 12:40
  • 1
    @AlexMorales Only XHTML files that are served up with some kind of XML MIME type (like `application/xhtml+xml`) are treated as XML (and therefore need an explicit namespace). Otherwise they're ordinary HTML, no matter the DOCTYPE declaration! – Mr Lister Feb 17 '12 at 13:18
  • You can still write your HTML5 documents as if they were XHTML. You just can't serve them up as xml. And yeah, Lister, I forgot about that O_O – Alex Morales Feb 17 '12 at 13:45
0

The first line in your CSS file looks wrong:

@charset “UTF-8?;

Should probably be:

@charset "UTF-8";
Christofer Eliasson
  • 32,939
  • 7
  • 74
  • 103