HTML & CSS
I am trying to build a simple log in page. I have a logo image floated left. Then I have a "user log in" table embedded inside a form. The css for the form is:
In FF (V 8) this table is nicely centered on the page. However, with IE :rolleyes: (V 8) the table is shown hard left, as if the CSS auto margins don't exist.
I hope this is sufficient information, and I can supply more.
Chrome (V 18) is happy with this, as is Opera (V 11.62) and Safari (5.*). But can anyone give me a hint as to what IE's problem is please?
Many thanks in advance,
Hello :). First things first, do you have a doctype on your page? If not, add one. The above code will work for me if a doctype is added. That's because without a doctype, IE reverts to quirks mode which makes it behave like IE5.5 which doesn't understand auto margins.
Thank you. This now works. I have also learned something.
One more thing whilst I am here - margin-top: 100px;
All the browsers I test on do give the table a margin at the top, but FF behave differently in as much as it appears to give a greater margin. It is easier to visualise this, so please see these screen shots. First Firefox:
and now Chrome:
You can just see the different margins. Is there something else I need to do to ensure my page behaves in a consistent manner?
You can view the page in question here:
Lastly, do others despair at IE as I do? :rolleyes:
Many thanks for any assistance.
1) Yes, other loathe IE. It has gotten better but it's still not amazing. Legacy browsers still give us isues.
2) Your doctype is still incomplete. It doesn't have a URI at the end which means it's still quirks mode for IE. Though you shouldn't be usingtransitional doctype. That implies your page is in transition from years ago. Use this doctype. Note the bold
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4) I can't see the screenshots so I can't really see what you're seeing. I will say though that my Chrome and FF are appearing identical to one another. What versions are you using? Be sure to clear your cache and tell us your versions (if that doesn't fix it)
Many thanks for your time.
Ah, well I'm using 11.0 so that's probably why I haven't noticed anything.
Hopefully one of the other members using 8.0 shows up and can help, although that browser seems to be a bit...outdatd. No idea when 8.0 came out (I'm sure a search would tell me) but it's had to have come out a while ago.
I think I will do an upgrade. Thanks for your time and assistance.
This topic is now closed. New replies are no longer allowed.