Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:53

Newbie problem: Resolutions and positioning.


Poster: Red Dalek
Dated: Sunday December 7 2003 - 12:48:42 GMT

Ok, I'm sure this is a really easy thing to solve, but I can't get it to work.

My website is located at http://www.geocities.com/dominicself

The menu looks fine in my resolution of 800*600, but not so good in others. I'm trying to edit the 'menu_data.js' file to use percentages instead of pixels to position it:

eg. instead of

top="132";
left="5";

I want the numbers to be percentages, but when I try this it doesn't work.

Could anyone help???

Thanks!


Poster: kevin3442
Dated: Monday December 15 2003 - 21:40:57 GMT

Hi Dominic,

The top and left properties are meant specifically to position a menu at an exact location by specifying px coordinates... so no, you can't assign percentages. It seems to me, however, that the issue is less to do with the position of the menu and more to do with the width of the menu and/or the 12% width of the #date table cell behind the menu. The menu width is fixed, but the area "containing" it adjusts to 12% of available width, so the background area could end up being too wide, or too narrow. I think it might be better to do one of two things:

(1) If you want to leave the menu at a constant, fixed width, then set the background area behind it to a constant, fixed width.

(2) If you'd like to have the background area behind the menu change size (as it currently does at 12%), then use the itemwidth property in your Main Menu so that the menu width will adjust to different window sizes... you can set it to a percentage, like itemwidth="10%"; or whatever value works for you.

Hope that helps,

Kevin


Poster: Red Dalek
Dated: Monday December 15 2003 - 21:58:25 GMT

Doing this solves the menu resizing but it only seems to resize the 'background' of the menu - see http://www.geocities.com/dominicself/template.htm

How can I get the rest of the menu to comply with the new 'itemwidth' command?


Poster: kevin3442
Dated: Monday December 15 2003 - 22:59:16 GMT

Hi Dominic,

Well.... it seems that, on initial display, your menu item separator does not span the full width of your menu until I resize the window (in ie6/win2k). The only way I can replicate this behavior locally is by omitting the page's doctype or by using a non-strict html 4.01 doctype. I notice that you do not declare a doctype in your html file. You could try
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

at the top to declare the 4.01 strict doctype. That may solve the current problem, but depending on your page design practices, it may introduce other issues down the road if you use any depriciated attributes or elements.

Kevin


Poster: kevin3442
Dated: Monday December 15 2003 - 23:07:40 GMT

Hi Dominic,

It looks like, on initial display, your item separators don't span the entire width of the menu, until I resize the window. The only way I can replicate that behavior locally is if I omit the doctype from the html page, or use a non-strict 4.01 doctype. The strict version seems to work. I notice that your test page does not define a doctype. Try
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

at the top of your test .html file to define the strict html 4.01 doctype, and see if that solves it. Note, however, that using the strict doctype may introduce other issues if your site design uses any depreciated attributes or elements.

Kevin


Poster: Red Dalek
Dated: Tuesday December 16 2003 - 16:01:33 GMT

Well - that sort of fixes the problem but introduces so many others that it's probably not worth it! ;)

I'm content to leave it since it doesn't look too bad in 1024*768 pixels - unless there is some other easy fix. After all - it's a free menu!