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!
Newbie problem: Resolutions and positioning.
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
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
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?
How can I get the rest of the menu to comply with the new 'itemwidth' command?
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
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
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: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Kevin
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
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
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: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Kevin