Need some help with this menu

Hi I have this menu at

The submenu is only positioned correctly on Firefox, its mispositioned on Chrome and IE, how can I fix that?

Also I would like to align the whole menu to the centre of the page but haven’t managed that either.

Any help appreciated, thanks.

Just add some padding top to the element to start with and then just show the background image on hover. Don’t try to increase the height on hover as the menu will jump around.

ok thanks alot, last thing i wanted to do is to add a background image to the main menu items on hover, basically an icon that appears above the menu, but I am not managing to make the main menu items higher than they are without breaking the whole thing.

thanks, how would i center the whole menu then?


That’s some invalid code you’ve got there :slight_smile:

It looks like yo copied Stu Nichols menu but forgot all the conditional comments to hide the bad bits from the validator and from good browsers.

You van make it work with this:

.navigation-headings ul table{position:absolute;left:0}

However you really should clean that up and insert the conditional comments as you have nested anchors holding other nested anchors at the moment which is not good.

I prefer the suckerfish menu with the short snippet of js for ie6 as the code is so much easier and more compact.

The easiest way is to work out the width and then just give it auto margins.


.navigation-headings ul {
[B]margin:0 auto;[/B]


Otherwise if you need a fluid width you’d need to do the same as I said for the submenu and use the inline-block method. (back tomorrow - I need some sleep.)

no im actually talking about the whole menu, so the main menu centred on the page, not the submenu

If you are talking about the submenu then you would need to remove the floats from the submenu and set the list to display:inline and the anchors to display:inline-block and then put text-align:center on the parent ul.

Very roughly like this:

[B].navigation-headings ul  ul{text-align:center;}[/B]
.navigation-headings ul :hover ul li {
[B]    display:inline;[/B]
[B]    line-height: 40px;
/* Text for the dropdown submenu */
.navigation-headings ul :hover ul li a {
  [B]  display:inline-block;
    font-size: 16px;
    Text-decoration: none;
    padding:0 20px;