Forum Moderators: open
I have did a search and found many threads/websites on this issue, but as i do know the problem and have come across some solutions i have not been able to fix it on my site.
Some sidenotes: My site is going to be a bilingual Japanese / English site, so i am using different header files (and the glory of php) to make it work. I am posting the code to the underconstruction portion of the site.
Thank you all for any help in advance.
English
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>The Realm</title>
<meta http-equiv="content-language" content="en" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Japanese
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="ja" xml:lang="ja" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>The Realm</title>
<meta http-equiv="content-language" content="ja" />
<meta http-equiv="content-type" content="text/html; charset=shift_jis" />
I also tried using this php sniplet for IE to no avail.
<?
if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")){ header("Content-Type: application/xhtml+xml; charset=UTF-8"); echo('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'); } else { header("Content-Type: text/html; charset=UTF-8"); echo ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'); }?>
Just a minor clarification: is the page is not displaying when you are trying to switch the mime type between
application/xhtml+xml and text/html, or does it not display even if you send text/html to all browsers (but still using the XHTML 1.0 Strict or XHTML 1.1 doctype)? Also, it's not something like a simple caching issue? (Just clear your temporary internet files in IE).
I should have elaborated further about the problem, By not displaying i meant, the background shows up, the source code is intact and viewable, but no content comes on screen. However when viewed in Firefox or Netscape everything shows up fine. My code also validates 100%.
I should avoid posting 5 in the morning after coding half the night..lolol
<Sorry, no personal URLs. See TOS [webmasterworld.com]>
Thanks in advance.
[edited by: tedster at 6:18 pm (utc) on Nov. 20, 2004]
If your page displays, even partially, in Internet Explorer, then it is not your mime-type switching code which is affecting things. If you remove the links to the stylesheets, does the page contain all the content (even if unstyled)? If so, then you have a CSS issue, either text formatting or positioning.
Thanks for the help. I turned out it was my stylesheet php include file.
I had:
<script src="/_globals/javascript/realm.js" type="text/javascript" />Instead of:
<script src="/_globals/javascript/realm.js" type="text/javascript"></script>
Which indeed was causing the page to render without any content, but still showing the css background. Looks like IE doesnt like self closing xhtml there.