Centering issue...quick fix?

Discussion in 'CSS' started by SearchBliss, Jan 27, 2010.

  1. #1
    Ok, in my sig, the site SearchBliss Web Tools has a top navbar (blue with white links). I want the links centered and I can't get it ti work. The problem is I am currently using padding which looks fine in FF and Opera, but is too far left on IE...so how can I center it so it looks good on all browsers?

    Here id the CSS section in question:
    #menu{
    width:950px;
    height:60px;
    margin:0 auto;
    background:#6AA2FD url(images/img04.gif);
    }
    #menu a{
    display:block;
    [B]float:left;
    padding:18px 14px 0 14px;[/B]
    text-decoration:none;
    font-size:1.5em;
    font-weight:bold;
    color:#FFFFFF;
    }
    Code (markup):
    I bolded the section that I'd need to change to get it to center. margin:0 auto didn't work, and text-align:center didn't either???
    Any suggestions would be great?
    Thanks!
     
    SearchBliss, Jan 27, 2010 IP
  2. Dogs_and_things

    Dogs_and_things Active Member

    Messages:
    97
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #2
    Quick reply,

    My guess is that you should give style to <ul> and <li> too.:)
     
    Dogs_and_things, Jan 27, 2010 IP
  3. Caden Grant

    Caden Grant Active Member

    Messages:
    294
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #3
    Try adding this to your code:

    
    ul {
     margin: 0 auto;
    }
    
    Code (markup):
     
    Caden Grant, Jan 27, 2010 IP
  4. SearchBliss

    SearchBliss Well-Known Member

    Messages:
    1,899
    Likes Received:
    70
    Best Answers:
    2
    Trophy Points:
    195
    Digital Goods:
    1
    #4
    Issue is resolved, thanks!
     
    SearchBliss, Jan 28, 2010 IP
  5. nivedita011

    nivedita011 Peon

    Messages:
    97
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Interesting
     
    nivedita011, Jan 29, 2010 IP
    Joak1m likes this.
  6. SearchBliss

    SearchBliss Well-Known Member

    Messages:
    1,899
    Likes Received:
    70
    Best Answers:
    2
    Trophy Points:
    195
    Digital Goods:
    1
    #6
    Why is it "interesting"?
     
    SearchBliss, Jan 29, 2010 IP
  7. iperceptives

    iperceptives Peon

    Messages:
    41
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    yes i also resume my problem by solvig this in this method
     
    iperceptives, Jan 30, 2010 IP