HTML - Xhtml5 Doctype Throwing Ie Into Quirks Mode?
I'm coding a site to be compatible with IE7 and up. It all looks great in just HTML5, but as soon as I try adding the XHTML doctype and stuff, IE goes into quirks mode. I've looked into it as much as I can. Here's what I think it should be along with PHP setting the MIME type:
HTML Code: <?php header('Content-Type: application/xml;charset=UTF-8'); ?> <?php echo '<?';?>xml version="1.0" encoding="UTF-8"?> <?php echo '<?';?>xml-stylesheet type="text/xsl" href="ie-xhtml-fix.xsl"?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr"> <head><meta charset="UTF-8" /> Then ie-xhtml-fix.xsl, from http://www.w3.org/MarkUp/2004/xhtml-faq#ie, is: Code: <stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform"> <template match="/"> <copy-of select="."/> </template> </stylesheet> I've tried every combination I could think of, but nothing works. It fully validates XHTML5 in w3.org's validator as it is. Can anyone help figure it out? Thank you. Similar TutorialsHey everyone, I'm a starting web developer and i build a website that work fine on IE8 until I saw on the developer tools that there is something call Quirks mode and IE8 Standard and when i change it to IE8 from Quirks it's look like a mess!! Can anyone tell me what is Quirks mode?! hello my schools email system can be accessed from outside but it rellies upon Internet Explorer quirks mode, I would like to try to force Firefox 3 into standards mode, or almost standards mode to see if it will work it does work in Opera and Firefox 2, so it isn't that urgent but I am interested if it is possible to override the doctype the problem is when I try to login it just gives an 'error has occured', it does use https though so that could be a problem thanks for the help, keeperofdakeys IE6 and 7 are giving me some problems when I check with them to make sure that everything is displaying correctly as it does in FireFox. I made a post about this a while ago (http://www.htmlforums.com/html-xhtml...tch-91890.html). I just want to know the things to know for designing a website with DIVs. From what I can tell so far -- IE tends to leave excessive vertical space between two DIVs that are stacked on top of eachother. IE also seems to have quirks when it comes to stacking DIVs side by side. For example: if two DIVs within a container DIV are side by side with no padding, margins or borders with whatever width in pixels that equal the width of the container DIV -- IE will for some reason add extra width to each of the two DIVs making them align one on top of the other instead of being layed out side by side. What must I do!? I've had problems in the past trying to get IE6 to display DIVs the same way as FF and IE7 displays them. So I recently decided to make a "skeleton" page just for the header section as a fresh start and I still can't figure out how to appease ol' IE6. I want the two DIVs to be side by side. But they aren't See what I mean: http://www.innotechnutrition.com/seeessess.php The CSS Code: body { text-align: center; } #container { /* does IE6 not like the line breaks? */ width: 770px; margin: 0px; padding: 0px; } #header { width: 770px; margin: 0px; padding: 0px; } #headerLeft { width: 50%; float: left; margin: 0px; padding: 0px; border: 1px solid #000; /* this won't show in IE6 for some reason */ background: #ccc; /* this won't work either */ } #headerRight { width: 50%; float: left; display: inline; margin: 0px; padding: 0px; border: 1px dotted #000; /* this don't show in IE6 for some reason */ background: #333; /* this won't work either */ } The HTML (doctype: DTD XHTML 1.0 Transitional) Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <div id="container"> <div id="header"> <div id="headerLeft"> LEFT div </div> <div id="headerRight"> RIGHT div </div> </div> </div> </body> </html> refer to new post I am not experienced in html coding, so please explain things s l o w l y to me I am using an online webpage builder. I made a table and copied the source code into the html editor window of this online builder, excluding only the <html> and <body> tags. When i load the page, it throws up a ton of unwanted 'style definitions' etc... There were too many characters to post here, so you can see the website, and the blaringly obvious problem at http://www.integratect.12h.us/index....try-Comparison If someone could check out the source code and tell me what is causing this text i would be very happy => )) hi, when a browser that gets a page served as txt/html with a xhtml doctype, i understand that it processes the page in standards mode, but as a html document. if the doctype is xhtml strict, say, does it 'fall back' to html 4.01 strict? in other words which 'standards'. cheers, deano. Anybody know if the IE 8 compatibility mode does a high enough fidelity job replicating IE 7 behavior that we can effective use it as a substitute for testing web sites in IE 7 itself? I can change the font size in <pre> mode ,but how do you change the font type in <pre> mode ?? I want comic sanserif Beyond placing the ringtone on a website in an audio format for download and hoping your visitor knows how to apply it; is there any way to say have a box to type in your number, the visitor types their number in, and their phone gets a call ~ with a box exclaiming, "Would you like to download and install this ringtone"? Want: ability to type, right on the webpage, phone number, and for it call their phone and begin download/installation of a ringtone? Thanks a lot =)! I'm looking for an html editor where i can click and follow hyperlinks under edit mode. This can be done in Microsoft Word: if one creates a bookmark within the html document, and a hyperlink to that bookmark, then clicking on the hyperlink will take you to the location of the bookmark when editing the document. Is there a windows/mac html editor, other than Word, with this capability? Thanks Hi all, i want to play the downloaded flv videos in offfline mode in HTML. I already done with online playing in HTML like youtube videos play in browser. But I have downloaded few videos and i want to play those videos in offline mode(without internet) by giving compelete path in Windows/Mac. Can anyone help in this case??? Thank You all.. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> this line seems to be at war with firefox. for some unknown reason my banner has a space between the lower body (it shouldn't). It is fine in IE and fine if the above line is not included. It seems to be adding some sort of padding into the table cells where the images are, somehow because of the domument type. ---------- Anyone have any solutions? LINK: http://uniden.zzl.org/ Again it is FINE in IE, but not if FF. HTML is Valid according to W3c Validator. Thanks in advance How improtant is the doctype tag? I am trying to teach myself html and am trying to figure out when to use what doctype. DOCTYPE basically tell the web browser what to expect when interpreting the html doc b/c html has been revised over the years, is that correct? Can someone please help me understand how to properly use the doctype tag and what is smart choice/ example of a specific doctype tag is and the reasoning behind why 'this' doctype tag is a smarter choice than an alternate doctype tag? Thank you! -Matt H. I have a doctype problem on my site which I cannot get rid of... Im using utf-8 have tried the below: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> !DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> --> !DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Many things are happening and I have read a lot of docs handling this... What do you suggest that I do? (Hmmm, - I need dansih characters... ) (In mysql working on the site I cannot see the correct characters... A workaround are being used...) Regards, Frank When I add a doctype it completely ruins my whole page layout. How can i fix this? Without: it fits my whole page and looks nice. With doctype: it squishes everything to the top. Help please. I didn't see an XML/XSL forum so I'm posting this here, maybe someone can help me. I'm trying something new, and it's giving me a headache. But hey it's all part of the process. Here's my site: HTML Code: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="/layout/frontpage.xsl"?> <page lang="en_ca"> <frontpage/> </page> HTML Code: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/> <xsl:variable name="lang" select="/page/@lang"/> <xsl:variable name="strs" select="document(concat('/strings/',$lang,'/strings.xml'))"/> <xsl:template match="page"> <html> <head> <title><xsl:value-of select="$strs/strs/str[@id='title']"/></title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="/css/css-default.css" /> </head> <body> <h1>Test</h1> </body> </html> </xsl:template> </xsl:stylesheet> Seems to work fine, but when I try to validate I get the following warning: No DOCTYPE found! Checking XML syntax only. It's clearly there. That's how other sites have done it and they validate... so what am I doing wrong? im using the following doctype: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> however when you add a table in I.E. it is creating a space between the top of the table and where it is inserted... why is this? any ideas how to solve this? thanks J. Hi simple question. I'm setting a background color on a div and when I put the Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> the background color disappears? Whys this? Heres the css Code: #content { width: 795px; background-color: f9dc6e; margin: 0px; padding: 10px; } Thanks I am totally confused about DOCTYPE code. My site does not have any doctype code on it and works fine, however been playing about with some jquery script and it wanted a doctype on my site to work. I have tried all the different doctypes listed on the w3 site and all make my site look strange and text/images all over the place the only way the site looks ok is without doctype. please advise the site in question is http://virtualhunterston.eu.org example test page with doctype added http://www.virtualhunterston.eu.org/...0-%20Copy1.htm |