IE7 and 8 formatting issues

Hey,

Can anyone help me find out why this page floats to the left in IE7/8?

http://www.prima.cse.salford.ac.uk:8080/~ibrarhussain/

How can i fix this?

Thanks

Silly me :slight_smile:

Thanks Stomme poes, i have got it working.

Thanks

Hi Billy

this is an easy one, I believe.

Your doctype isn’t complete, which is enough of an excuse for all IE’s to act like IE5 : )


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

Even though browsers don’t actually use the referrer url, you need to have it for the browser to assume Standards Mode (exception is when using the HTML5 doctype).

Copy the HTML4 doctype from this page: http://www.w3.org/QA/2002/04/valid-dtd-list.html You see, you’re missing that second line.

I really do copy and paste from there… less chance of a typo screwing stuff up (and I’ve had a typo, an extra space between I think the words DTD and HTML or something, and that was enough to trigger Almost Standards Mode in Firefox!).

And, new page? Use Strict : )