I am using the Zen theme for a site I am working on and having issues with the site centering in IE6. I want the site to be left justified for the layout. I changed the line:

  #page,
  #closure-blocks
  {
    /*
     * If you want to make the page a fixed width and centered in the viewport,
     * this is the standards-compliant way to do that. See also the ie.css file
     * for the necessary IE5 hack to center a div.
     */
    margin-left: 0; /*changed*/
    margin-right: 0; /*changed*/
    width: 960px;
  }

I changed the left and right margin to 0, it was auto. In Firefox the layout moved to the left as it should but in IE6 it is still centered in the browser. Is there some other line that I am missing in one of the css files that will keep IE6 from centering the layout? Thank you for any help I receive.

Comments

roginald’s picture

there is a line in the main zen ie.css stylesheet you need to over ride in your local theme:

/** body **/
body
{
_text-align: center; /* 1st part of IE5/IE6quirks centering hack */
}

that is most likely the problem.

ryanfc08’s picture

OK, I tried changing that code to:

  body
  {
    _text-align: left; /* 1st part of IE5/IE6quirks centering hack */
  }

However, it is still centering the content in IE6.

Update:

I also tried just removing:

  body
  {
    _text-align: left; /* 1st part of IE5/IE6quirks centering hack */
  }

  #page
  {
    _text-align: left; /* 2nd part of IE5/IE6quirks centering hack */
  }

But it is still centering the page in IE6.

ryanfc08’s picture

Does anyone know what is causing the centering in IE6?

ryan.nauman’s picture

Did you figure this out yet? I did it once but can't remember. I'm looking into it now. Putting body{text-align:left !important} in my subtheme_name_zen.css file fixed this. text-align:left !important was already in my ie.css file so I don't know why this is working but whatever

Even though I copied ie.css into my subthemes folder for whatever reason if you look at the source (at least in my version) it is still opening the original zen ie.css instead of my subthemes version. This is why I needed !important on the body in my subthemes main css

ryan.nauman’s picture

I believe the reason the original zen theme's ie.css was being called for me even though I had an ie.css contained within my subthemes folder is becaues of my subthemes .info file. Uncommenting the line:

; Set the conditional stylesheets that are processed by IE.
conditional-stylesheets[if IE][all][] = ie.css

seem to help call my subtheme's ie.css instead