6 Replies Latest reply: May 13, 2011 3:31 PM by Nancy O. RSS

    Help centering divs

    phyllisj9 Community Member

      Okay I'm tearing my hair out here!

       

      I'm working on a Web design for a class.  I'm trying to make a fixed header that is centered on the screen.  The block containing the header is 950 pixels wide and should auto-center.

       

      Here's a link:

      http://pjutter.com/Sessions/AdvancedCSS/Lesson3/indexNew.html

       

      This is working on Firefox and Google Chrome but not on Internet Explorer (where it is totally messed up and unreadable).

       

      I cannot figure out how centering works.  Supposedly margin: 0 auto should center a div, but that only occasionally works.  I've used negative margins to center the 950-pixel div, and that works on everything except IE which is ALL messed up.

       

      The CSS file for the header is the one called headernav.  The others are part of the Blueprint framework which I'll be using on the grid underneath the header.  So just ignore the others.

       

      Can anyone help me with this?

       

      Thanks, Phyllis