SmartMenus DHTML Menu / JavaScript Menu - Forums

forums

You are not logged in.

#1 2007-May-27 17:44:29

crebilis
Member
Registered: 2007-May-27
Posts: 3

alignment problems with smartmenus7

Hi,

First of all. Great product and really easy to use. However I have a small problem. My menu isn't aligning as I want it to. I have my page centered in a div with a width of 1024px. When I place the menu however, it goes outside the div and starts at the left of the page.

http://www.cosmicchaos.net/scouts/scouts_ajax/ (use FF or opera, the lay-out sucks in IE tongue)

If you go to that site, you'll see what I mean. Is there a way around thios problem without hard coding the alignment?

Offline

 

#2 2007-May-27 18:21:48

crebilis
Member
Registered: 2007-May-27
Posts: 3

Re: alignment problems with smartmenus7

Edit: of course I ment smartmenus 6 big_smile.

I have found a rather simple solution for this problem (of course when you look for a solution for a few days, you find nothing, and as soon as you ask for help on a forum, you find the solution yourself roll).

This is the css I added to make it work.

ul#Menu1{
    margin-left: -512;
    left: 50%;
    position: absolute;
    margin-right: auto;
    width: 1024;
}

That along with the clearFix stuff found in the manual makes it work like it should.

Offline

 

#3 2007-May-27 19:08:10

smartmenus
Site Admin
From: Plovdiv, BULGARIA
Registered: 2003-Feb-23
Posts: 1109
Website

Re: alignment problems with smartmenus7

Actually, you just need to set relative position for your main menu instead of absolute.

Just follow the instructions for embedding a main menu in a DIV element on the page from the following section of the SmartMenus 6 User's Manual ("manual.html" in the download file):

"4.10 Embedding a main menu in a table cell or a DIV on the page"

This will naturally position your horizontal main menu inside your main DIV "overkoepel".

Please let me know if you have any problems.

Cheers!


-Vasil Dinkov-

Offline

 

#4 2007-May-27 19:57:53

crebilis
Member
Registered: 2007-May-27
Posts: 3

Re: alignment problems with smartmenus7

The problem with that is that the header image is not a background, but an actual image (if that makes any sense), so the menu appears under the image, which is not as it's supposed to be. If I put the image as background for a header div, I don't know how I can make the MAP thingy work. Also, as soon as I remove the border from the header div, the lay-out is ruined again.

http://www.cosmicchaos.net/scouts/borderremoved.jpg

EDIT: And another question. I noticed that I use RC1 of smartmenus. I downloaded the latest version now and replaced all files except for the config file, as I don't want to re-config the menu again. Is it necesary to replce the config file as well?

EDIT 2: I got it to work. Seems like it was my own stupid fault. I added some css to the position field for the main menu, so I could show the borders. I didn't correct it properly afterwards. Many thanks for the help anyway smile.

Last edited by crebilis (2007-May-27 20:08:25)

Offline

 

#5 2007-May-28 03:29:11

smartmenus
Site Admin
From: Plovdiv, BULGARIA
Registered: 2003-Feb-23
Posts: 1109
Website

Re: alignment problems with smartmenus7

I am glad to hear you've coped. smile

crebilis wrote:

EDIT: And another question. I noticed that I use RC1 of smartmenus. I downloaded the latest version now and replaced all files except for the config file, as I don't want to re-config the menu again. Is it necesary to replce the config file as well?

No, you don't need to replace your existing config file and reconfigure it again. To update you simply need to replace the script core "c_smartmenus.js". There is just one new variable added in the config file in v6.0 final in comparison to RC1 - this is the "c_rightToLeft" variable in the first section of the config file. It is needed only for pages with right-to-left text (e.g. Hebrew, Arabic...) so you probably, won't even need it. But if you need it, you can add it manually to your existing config file. Everything else in your config file should be completely compatible with v6.0 (as well as with any future 6.x release).

Cheers!


-Vasil Dinkov-

Offline

 

Board footer

Powered by FluxBB