vertical positioning versus browser window size issue

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Shelleuk
Advanced
Advanced
Posts: 22
Joined: Thu Feb 26, 2004 12:45 pm
Location: Hackney London UK
Contact:

vertical positioning versus browser window size issue

Post by Shelleuk »

How to optimise vertical menu position for both 1024 x 768 & 800 x 600 browser window sizes? My table is centered on the page - have top and left figures as below - works ok in 1024 x 768, but of course positioning is comletely wrong in smaller browser window.

Does this have to do with relative positioning? How can I make my vertical menu work in both size browser windows if I want my content to be centered on the page with the menu just to the left of it?

Code: Select all

with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=117;
left=130;
Site: http://www.canfin-ibiza.com

Thanks

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

Post by Ruth »

Hi Shelleuk,
One choice would be to add a column to the table and place the menu in it setting its position relative. As the resolution changes, the menu would shift as the table does, since it is in the table. However, you would have to remove the table from the div to do that. You might take a look at menu sample 9 which explains how to place the menu in a table. You can't just put the menu calls there.


Ruth
Shelleuk
Advanced
Advanced
Posts: 22
Joined: Thu Feb 26, 2004 12:45 pm
Location: Hackney London UK
Contact:

Post by Shelleuk »

Ruth - hi - thanks for your solution...but I do not understand this:

The sub menus need to be built as HTML objects on their own and not be embedded inside any other HTML object. Just after the body tag is a good place to put the sub menus. To do this move all of your menu script definitions and your menu data to just after the body tag and render the menus as normal with the drawMenus() command.

Is there some example code somewhere so i can see where to put all other menu code apart from the Main Menu which I understand needs to go here:

Code: Select all

<td height="202" align="left" valign="top"><img src="/images/shim.gif" width="1" height="190"><script>with(milonic=new menuname("Main Menu")){
style=menuStyle;
alwaysvisible=1;
top=117;
left=130;
position="relative";
overflow="scroll";
aI("text=Home;url=/index.html;");
aI("text=Canfin;url=/canfin.htm");
aI("text=Ibiza;showmenu=Ibiza;url=/ibiza.htm");
aI("text=Gallery;url=/gallery.htm;");
aI("text=Getting there;showmenu=Getting there;url=/getting_there.htm");
aI("text=Reservations;url=/reservations.htm;showmenu=Reservations");
aI("text=Contact;url=/contact.htm;");
}</script></td>
Michelle Cannon
Shelleuk
Advanced
Advanced
Posts: 22
Joined: Thu Feb 26, 2004 12:45 pm
Location: Hackney London UK
Contact:

Post by Shelleuk »

Ruth - ignore last email...sorted that problem...I am now posting a new topic on why my submenus won't show ! or at least only show sometimes??

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

Post by Ruth »

Hi Michelle,
Just in case someone else checks this for a solution, I figured I'd post the response.

All that means is: make your menu data file, then take the main menu out of it, put that in the table cell where you want the menu inside script tags, then
The sub menus need to be built as HTML objects on their own and not be embedded inside any other HTML object.
means to put the call for the menu_data.js file along with the 3 other milonic files right after the body tag. This means that the milonic files including the menu_data file are all 'read' by the browser and the browser has all the submenu information before it reads the main menu.

Ruth
Post Reply