Header Centering Problem In Firefox

Discussion in 'HTML & Website Design' started by tonyuk, Sep 8, 2008.

  1. #1
    This centers the header (logo-bg.gif) in IE6 but not in Firefox. Any ideas?

    div#globalwrapper { text-align: center; }

    /* HEADER ELEMENTS
    -------------------------------------------------------------------------*/


    div#header { background-image: url(../images/headerbg.gif);
    }
    /* brand
    -------------------------------------------------------------------------*/
    div#brand {
    background-image: url(../images/logo-bg.gif);

    background-repeat: no-repeat;
    background-position: top center;

    width: 960px;
    height: 240px;
    }


    /* top vertical menu in header
     
    tonyuk, Sep 8, 2008 IP
  2. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just guessing without the visual but try:

    div#brand {
    background-image: url(../images/logo-bg.gif);

    background-repeat: no-repeat;
    background-position: top center;
    margin: 0px auto;
    width: 960px;
    height: 240px;
    }

    I'm just guessing that the DIV isn't centered
     
    wd_2k6, Sep 8, 2008 IP
  3. nfd2005

    nfd2005 Well-Known Member

    Messages:
    295
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    130
    #3
    Do you have an example we can look at?
     
    nfd2005, Sep 8, 2008 IP
  4. belkocrnic

    belkocrnic Active Member

    Messages:
    107
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #4
    when you want something to center, put it in parent div and in css for that div write margin:0 auto
     
    belkocrnic, Sep 8, 2008 IP
  5. Valdum

    Valdum Guest

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Putting your content in a table in a div always works. Centering cross browsers is always a pain.
     
    Valdum, Sep 9, 2008 IP