Jump to content

PHP include not working in IE6


karleyb

Recommended Posts

I am using a simple include to put the header, navigation and footer into web pages. On an initial load the left side navigation doesn't show up in IE6 but shows fine in IE7 and Firefox. If I call a page from another page the navigation shows up but on on initial load. The site is www.staytan.com/newsite/index.php. Any suggestions would be greatly appreciated.

 

Link to comment
https://forums.phpfreaks.com/topic/90833-php-include-not-working-in-ie6/
Share on other sites

Slow down, your accusations that php is failing in IE6 is a joke because php doesn't care what browser you have.  Everything in php processors Prehypertext meaning it does all its magic before the browser starts to process it (less output buffering) 

 

It don't care if its IE, command line, FF, Safari or the magic browser I just made up of Spamalot.  They all get the same text.

 

Its how ie6 takes your output and displays it is your issue.

 

 

The page at the link has a significant number of markup validation errors (most related to mis-matched tags) and is probably causing different browsers to see and render the html differently.

 

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.staytan.com%2Fnewsite%2Findex.php&charset=%28detect+automatically%29&doctype=Inline&group=0

 

Fix all html and css validation errors, then worry about cross-browser operation.

This is a perfect example of why people should learn proper (x)html and CSS before learning PHP. It doesn't matter how good you are at outputting something, if the code you output is crap in itself. Better to learn what you should be outputting and then, and only then, learn how to output it. I am shocked at the atrocious (X)HTML I see on here all the time.

If you want more help, take this over to the CSS forum, cus that is where your problem is. PHP is generating the code just as your programmed it to (do a view source on the page)

 

I found a style attribute of margin-left:-100%; on your navigation, and I'm pretty sure that is why it's not showing. Also, don't use float:left for EVERYTHING on the page. I made these changes, and it looked pretty good, try them out:

 

-Removed #header {float:left;}

-Removed #navigation {margin-left:-100%;}

-Removed #wrapper {float:left;}

-Moved <div id="navigation"> before <div id="content">

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.