Menu Positioning. Tried. Failed. Help?

Home » Forums » Free DHTML Menu Builder » Menu Positioning. Tried. Failed. Help?


Registered User
29 posts

I've got a vertical menu that doesn't want to go where I put it; tried several positioning options and had no luck. Granted, I'm not the sharpest crayon in the coding box but it isn't for lack of effort, I swear.

I've posted some demo pages. The menu should appear in the black area and fly out over the image. (There will actually be flash where that image is and I've seen other posts with issues on that topic but I'd like to slay one dragon at a time.)

http://eternallighting.com/dhtmlmenu.htm

Fail.

So then in an iFrame with the menu sourced off another page (http://eternallighting.com/dhtmlmenusource.htm):

http://eternallighting.com/dhtmlmenu2.htm

Right place, wrong position, won't fly out properly. (Tried layering, couldn't get it to work.)

Fail.

Back to no frame. Then read posts about using a span tag for positioning. Had a hard time wrapping my head around it but tried anyway.

http://eternallighting.com/dhtmlmenuSPAN.htm

Disappeared.

Fail.

So, three strikes and I'm here. :|


As always, any help gratefully accepted.


Senior Advisor
3,916 posts

Hi Lee,
Look for this in your code
var StartTop=1; // Menu offset x coordinate
var StartLeft=1; // Menu offset y coordinate

starttop try setting to 0 and the start left to 20
see if that does anything for ya.
(your first test menu)=sorry "It's A Smart Person That Asks"
http://bruzer.coffeecup.com



Registered User
29 posts

Hey Bruzer, thanks for the reply. :)

I see where we're going with this and gave it a shot with 55, 160 (based on the pixel grid on the work area) as the variables and it definitely scooted over but it didn't line up where I expected.

Refresh & take a look. http://eternallighting.com/dhtmlmenu.htm

I'm sure I can get it where I need it to be but then that menu is fixed. If someone resizes their browser or has a differing resolution, then it won't work.


Senior Advisor
3,916 posts

Hi Lee,
check the coding here
http://helpingoutsite.com/
I changed the table a bit, "It's A Smart Person That Asks"
http://bruzer.coffeecup.com



Registered User
29 posts

Very kind of you, Bruzer. Thanks so much!

Perhaps I'm a duller crayon than I thought however.

By moving the table, didn't we essentially fit the page layout to accommodate the menu? I took the coding from the page you did, centered the table and still have the menu hanging stubbornly at the left.


Senior Advisor
3,916 posts

Its basically just a matter of changing the numbers as before (top and left) i believe.
I changed these:
var StartTop=-90; // Menu offset x coordinate
var StartLeft=20; // Menu offset y coordinate

Ok I see what you mean! "It's A Smart Person That Asks"
http://bruzer.coffeecup.com



Registered User
29 posts

Sorry if I'm being obtuse, but does that address the issue of site visitors having various browser sizes and/or resolutions?


Senior Advisor
3,916 posts

Well as you started when it's centered it throws off to left, so I'd say no, but I'm still testing it...:) "It's A Smart Person That Asks"
http://bruzer.coffeecup.com



Registered User
29 posts

I'm thinking there has to be a way to change the variable here:

var MenuCentered='left'; // Menu horizontal position 'left', 'center' or 'right'
var MenuVerticalCentered='static'; // Menu vertical position 'top', 'middle','bottom' or static

and of course the dhtml to which it relates.

Right now the only options are left, right, center for horizontal positioning.
Top, middle, bottom or static for vertical.

There has to be a way to add either relative positioning or anchored positioning as an option but I definitely don't want to reinvent the wheel nor would I know how to go about doing it other than trial, error and poking around like I have been.

Whaddya think? :D


Registered User
29 posts

Or.....what if that series of positioning variables were removed entirely and it would just inherit it's location from wherever it was inserted?

Hmmm...

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.