vertical menu in a centered layout

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
donH
Advanced
Advanced
Posts: 22
Joined: Sat Apr 17, 2004 1:34 am
Location: US
Contact:

vertical menu in a centered layout

Post by donH »

This is my first post. I am trying to discover if the menus will work in a layout I am working on before I purchase a license.
If somebody could point me to the resource on the site that explains it, I would be very grateful.
The layout is centered in the viewport. The menus are vertical and left-justified within the layout. I don't see how to get the submenus properly aligned with the parent menus. I've messed with the menus a bit, but the answer eludes me.
A screen shot of the layout they are needed for is here:
http://test.hinshawdesign.com/slplf/round2/layout1.html

Thanks very much,
Don Hinshaw
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

If you are using divs, you may be able to set
screenposition="center";
left="offset=-250px";

What you are doing is centering the menu and then minus offset the main menu from the center.

leave out
left=?; and use offset minus from the center how ever many pixels.

but keep

top=??;

similar to centering a horizontal menu but keeping the default vertical.

maz
donH
Advanced
Advanced
Posts: 22
Joined: Sat Apr 17, 2004 1:34 am
Location: US
Contact:

vertical menu in a centered layout

Post by donH »

Thanks for the feedback.
I have posted a quick sample at: http://test.hinshawdesign.com/slplf/men ... _test.html It seems to work as expected in all the browesers I have tested.
I used tables for the layout, but I am more interested in using CSS, so I have a question about your post:
What is the significance of "-250px" as the value of the left offset? In other words, how did you arrive at that number?

Thanks a lot,
Don
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Sorry, no I didn't measure, it was a guess-estimate just so you could see what it should look like. There are screen rulers that are very helpful to measure.

If you are only using tables, then you can add the <script.... menu_data.js... /script> in the table.

position="relative";

leaving off top and left because its going to adjust from or fit into the table.

or follow the example for a menu in a table.

When ever possible its best to position it absolute if you can, its more browser compatible.

maz
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I looked at your test page. You have the menu placed in a table, and it is the table that you are center aligning, so the menu will move with the table since it is in the table itself inside script tags.

Ruth
donH
Advanced
Advanced
Posts: 22
Joined: Sat Apr 17, 2004 1:34 am
Location: US
Contact:

vertical menu in a centered layout

Post by donH »

Thank you Maz, and Ruth.
I am working on a layout that relies more heavily on CSS for layout and the menus seem to be aligning properly thus far. I will post that when I am finished.
I am testing on Win2K IE6, 5.5, Moz 1, Firefox .8; Mac IE5.2, Moz 1, Safari

If this comes together, I will definitely be purchasing multiple licenses! This is the first DHTML menu system I have worked with that seems to be happy being in a centered layout.

Don
donH
Advanced
Advanced
Posts: 22
Joined: Sat Apr 17, 2004 1:34 am
Location: US
Contact:

vertical menu in a centered layout

Post by donH »

I would appreciate it if anyone has a moment to look at:
http://test.hinshawdesign.com/slplf/men ... _v2.1.html
to see if there is any obvious funkiness going on.
I think the menus are behaving pretty well.

Thanks,
Don
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

The main menu appears okay, and submenus open.

Safari.


maz
Post Reply