Forum Moderators: not2easy

Message Too Old, No Replies

Menu Not Centering

         

badams1

3:14 pm on Nov 19, 2004 (gmt 0)

10+ Year Member



I'm still learning css and just picking up bits and pieces by browing the internet. is something like this possible? let me explain it.

I have a banner image (doens't change, just our school logo) that I would like centered on the page (it is 925px wide). I'm also using the ultimate drop down menu for our menu that I would like positioned at the bottom of the banner. (This is not the problem, I have that taken care of).

My problem is that I cannot get the menu centered within the banner image.

example:
--------Banner Image---------
--------Menu System----------

That is about how I would like it to be but instead it is like this:
--------Banner Image--------
--Menu System---------------

thanks for any help.

bloke in a box

3:34 pm on Nov 19, 2004 (gmt 0)

10+ Year Member



Want to post some of the code you're currently using?

BonRouge

3:36 pm on Nov 19, 2004 (gmt 0)

10+ Year Member



css:

#banner, #menu {margin:0 auto;}

might work. It all depends on the rest of your page.

badams1

4:46 pm on Nov 19, 2004 (gmt 0)

10+ Year Member



well, i just went around the problem. By using BonRouge suggestion in another thread to make the whole page centered then I absolutely position the menu.

It works and I'm happy.

Really happy now cause it just started working somewhat in IE too. Before in IE the banner was centering in the page, but it was like the page was like 1600px wide yet it really only was 1024. Now in IE everything is aligned but not in the center, its on the left instead (yet is perfect in firefox). At least 95% of the users use IE.

If I need to post the code I will, but the css is 100 lines and the html is well over 350 lines. (I realize that there is probably a lot of useless stuff in my css but I'm afraid to change anything now that I got it working. )

HelenDev

5:01 pm on Nov 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm afraid to change anything now that I got it working

LOL! I Know the feeling - that little logo, or text box might just be holding the whole page together!

theguX

5:08 pm on Nov 22, 2004 (gmt 0)

10+ Year Member



Yea, I know why it won't work in ie. The margin:auto; thing doesn't work in ie. Instead, you have to apply a wrapper div that has text-align:center; in it. That should work.