...

View Full Version : IE CSS problem



ikillfish
10-21-2007, 01:52 AM
Hi, i need help because im going to go insane if I don't figure this problem out...
Im redoing a website for the SPCA and when ever I upload it to thier system the layout changes and doesnt center like its supposed to. It looks fine in all browsers except IE... The reason ive found is that the shell the spca uses adds a javascript tag to the top of the code. The code works fine until something (anything) is added above the <html> line, at which point the left column leaves its normal position and goes all the way to the left... its killing me... I can't do anything about the javascript being added... Also, im using the opensource css template called nautica and have had no problems except ^

I currently have it loaded on my website http://www.artifactdesign.us/maddies
it can also be found here http://www.spcaofnn.org

Thanks for taking the time, if you need me to be more specific just let me know,
David

PappaJohn
10-21-2007, 02:14 AM
Two things I'm seeing:

1. Neither version includes a valid DOCTYPE (http://www.codingforums.com/showthread.php?t=18346) which will force browsers into quirks mode.

2. The version on the spca site doesn't have an opening <html> tag.

There may be other problems. It would be a good idea to validate (http://validator.w3.org/) your pages.

ikillfish
10-21-2007, 04:22 AM
Thanks for that, i deleted the doctype in my quest to narrow down the problem. I added it back and the problem still exists. If I delete everything above the doctype the layout goes back to its correct placement... Does it matter what type of doctype it is?

Thanks for the help,

David

PappaJohn
10-21-2007, 04:29 AM
From what you're saying, the problem is what is being included before the doctype. Anything before the doctype will put the browser into quirks mode. As you've seen, this is particularly troublesome in IE.

After you've uploaded the file, try editing it to move the problem code to below the doctype where it belongs. If you have access to a control panel for the site, it probably has a means of editing the file in place.

Any doctype you use will not matter as long as there is code before it.

ikillfish
10-21-2007, 04:34 AM
Thanks again for your help, unfortunately im in a position where I have no way to keep the extra text from being added before the doctype. Im looking for a way around it, if one exists...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum