Click to See Complete Forum and Search --> : [RESOLVED] Internet Explorer 6.0 problems


KenL
02-25-2008, 02:35 PM
Hi all,

I used Webcalendar for our site plus additional header and footer. I got everything to work correctly in Firefox and Explorer 7.0 and the page passed the validator check. However in Internet Explorer 6.0 the calendar appears in the top left corner instead of in the middle. I've spent a couple of days looking for why it does that but no luck. Any ideas?

My site is at http://www.rodgershealth.org/calendar

Thank you for your help.

Tabo
02-25-2008, 02:57 PM
You're using XHTML, meaning you are using margin:0pt auto; to centre align the content. This does not work in a lot of versions of IE when applied to a table, so instead use <div style="margin:0pt;auto">. You also need to use text-align:center; to get support for old versions of IE, then make everything else align left after.

Though there is a bug in IE5/mac with centre aligning tables, however I don't have a mac and I think the bug only apples to <div align="center">

I advise you do this:

<div style="margin:0pt auto;text-align:center">
<table style="width:400px;">
<tr>
<td style="text-align:left">
...</...>
</div>

Frank62
02-25-2008, 03:02 PM
Ken,

The XML line above the doctype line makes IE6 go in quirks mode, and in quirks mode IE6 does not support margin: 0 auto. The doctype line has to come first.

KenL
02-25-2008, 03:34 PM
Thank you so much for your quick response. Will give it a try.

WebJoel
02-26-2008, 07:11 AM
... so instead use <div style="margin:0pt;auto">. margin:0px auto; (no " ; " between the values. -Just a typo. :)