CSS aligning a horizontal menu

Discussion in 'Web Design and Development' started by Sdashiki, Dec 1, 2006.

  1. Sdashiki macrumors 68040

    Sdashiki

    Joined:
    Aug 11, 2005
    Location:
    Behind the lens
    #1
    Been getting my feet wet with some CSS...

    I have an image element up top, and a horizontal CSS menu directly after.

    Why can I not align these two things, as seen in the following screenshot?

    cssmenu.jpg
     
  2. Sdashiki thread starter macrumors 68040

    Sdashiki

    Joined:
    Aug 11, 2005
    Location:
    Behind the lens
    #2
    Boom, always the tweaker...

    had to make the BODY css tag be text-align:center...

    seems doing it to individual <div>, isnt workin...

    :D

    edit: seems it looks fine now in Dreamweaver, but FF and IE, same problem...sigh...and I cant always seem to get the top image and the menu bar to line up one on top of the other, sometimes there is a gap...
     
  3. majorp macrumors 6502

    Joined:
    Nov 28, 2005
    Location:
    UK !!!
    #3
    put the closing div align tag at the end just before body.

    or

    in the css for navbar put

    margin: 0 auto;

    i think you would have to put a class on the image and also apple margin auto to it. maybe you should just put the whole thing in a wrapper?
     

Share This Page