Jump to content

Recommended Posts

Posted

I am in the process of replacing my site's navigation menu. I have decided to go with a Horizontal Cascading Menu using CSS. It appears to be working in both Firefox and IE fine, the problem is I can't figure out how to center it?

 

Although this is a work in progress and I am not finished working out all my layout issues, here is a link to what I have so far: New Menu.

 

Thanks for any suggestions you might have.

Posted (edited)
It appears to be working in both Firefox and IE fine, the problem is I can't figure out how to center it?

I don't know, is it? If you're the one having the problem, why are you asking us?

 

Sorry, couldn't resist it :D

 

Try making a CSS style where you set

 

#menu { margin-right: auto; margin-left: auto; }

 

You may have to add width, there to make it work.

 

PS - Great job with the menu! :unsure:

Edited by borfast
Posted
I don't know, is it? If you're the one having the problem, why are you asking us?

 

Sorry, couldn't resist it :(

I guess I did leave myself open for that one. :P

Try making a CSS style where you set

 

#menu { margin-right: auto; margin-left: auto; }

 

You may have to add width, there to make it work.

Thanks, that works for Firefox just not IE. When is IE ever going to properly support CSS? :group: I guess I'll just have to find a IE solution for that too.

PS - Great job with the menu! :lol:

Thanks, although I borrowed the concept from here.

Posted (edited)

Are you sure that doesn't work with IE? Have you tried using that technique on a clean HTML file, defining only a <div> and the CSS to center it? I'm asking because I use that technique everytime I need to center something and it works fine with IE... :\

 

As for IE 7, here's what Paul Thurrott has to say about IE 7 (among many other things):

My advice is simple: Boycott IE. It's a cancer on the Web that must be stopped. IE isn't secure and isn't standards-compliant, which makes it unworkable both for end users and Web content creators.

Simple enough to me :)

Edited by borfast
Posted
Are you sure that doesn't work with IE? Have you tried using that technique on a clean HTML file, defining only a <div> and the CSS to center it? I'm asking because I use that technique everytime I need to center something and it works fine with IE... :\

I haven't tried using a "div" yet, I'll defiantly give it a try. It might take me a few days, until I can get back into it. My wife and I just added our second child to our family this week. Great, I get one kid out of diapers and here is another one! :)

Posted

Since you have the menu in a div why not just set the div's width as 100% (to be safe though as browsers tend to set divs to this anyway) and use text-align: center;

Posted
I haven't tried using a "div" yet, I'll defiantly give it a try.  It might take me a few days, until I can get back into it.  My wife and I just added our second child to our family this week.  Great, I get one kid out of diapers and here is another one!  :blush:

Congratulations! :P

Posted
I haven't tried using a "div" yet, I'll defiantly give it a try.  It might take me a few days, until I can get back into it.  My wife and I just added our second child to our family this week.  Great, I get one kid out of diapers and here is another one!  :P

Congratulations! :blush:

Posted

Thanks everyone for the congratulations.

 

As for the problem centering the menu, I have that worked out. I had the "div" inside a table. Once I moved it outside the table, everything centered in IE and Firefox.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...