• The central bulk of my pages are shifted slightly to the left in Internet Explorer 6 and possibly other editions.

    This can be seen with a white line on the right at https://www.ashleyhill7861.org.uk/ and text being right on the left boder at https://www.ashleyhill7861.org.uk/greyfriars/

    I now have identified the problem, and am hoping you know the solution!

    In my style sheet there is a section of CSS under #page which is magin: 0 auto; .

    I now have discovered that IE does not know what to do with margin: 0 auto;

    Is there a way of centering the middle section of the site of the above two links, not using margin: 0 auto; which centres the middle section perfectly in all browsers.

    Many thanks.

Viewing 1 replies (of 1 total)
  • For IE6 you’re going to want to add text-align: center; to the element parent to the container which you are using margin: auto;

    For example if you had:

    <body>
    <div id="wrap">

    You could try:

    body {text-align: center;}
    #wrap {width: 1000px; margin: auto;}

Viewing 1 replies (of 1 total)
  • The topic ‘margin: 0 auto; not working for Internet Explorer’ is closed to new replies.