View Full Version : Any Link DD Menu - top menu positioning glich

09-26-2005, 02:59 PM
Script: http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

I am happy with the way the menu works but since I started working on my pages one small glich has been annoying me. I was going to just leave it as it is but it has go to me so much I feel I need to ask for help!

Please take a look at the homepage of my site (sorry, the body text hasn't been decided yet) - www.parentingwestlothian.org.uk

The bug is the positioning of the menu option 'Parenting Programmes' (you guys in the US will need to excuse our British spelling I'm afraid!)
The text is not positioned centrally but is about 2-3 characters to the left of where it should be. I use Front Page 2000 and everything looks fine in the Normal pane of FP, it is centred in the cell and all the menu cells are equally spaced. But switch to Preview, or view the page in a browser, and the text moves over to the left. As you can see, all the other menu options are OK.

Thinking it was possibly something to do with it taking up two lines I temporarily edited it down to just one word - no difference! I have checked all the parameters in the HTML and everything seems fine or certainly consistent with the other menu options at least.

Can anyone shed some light on this. Admittedly it just a minor fault that most visitors would not notice, but I know it is there and it is driving me nuts!

09-26-2005, 11:49 PM
Hmm my first guess was that it's due to the text spanning two lines ("Parenting Programmes"). The menu then is aligning itself with "parenting." Are you sure the buggy offset still exists if it's just one word (ie: parent)?

09-27-2005, 01:52 AM
Where you have:

<table border="1" cellspacing="0" style="border-collapse: collapse" width="756" cellpadding="0" bgcolor="#C73F17">
<td width="778" align="center" colspan="6" bgcolor="#FFFFFF">
<img border="0" src="header2.jpg" width="760" height="95"></td>The fact that a table cell is wider than the table it is in is throwing off the entire alignment of the table. By simply removing the width for the cell:

<table border="1" cellspacing="0" style="border-collapse: collapse" width="756" cellpadding="0" bgcolor="#C73F17">
<td align="center" colspan="6" bgcolor="#FFFFFF">
<img border="0" src="header2.jpg" width="760" height="95"></td>Things will line up properly. I also happened to notice that you are missing a units designation for the font-size of the dropmenudiv style (added here in red):

border:1px solid gray;
font:normal 10px verdana;
}This is only a problem in certain browsers but, should be fixed.

09-27-2005, 08:00 AM
Thanks for the replies guys.

jscheuer1 - your advice was spot on. I have removed the table cell value and the menu text now lines up. I suppose this is the problem of using Front Page to build tables for you, although I thought I had the table cell set at 100% or slightly less, so how it became 778 I don't know.

Thanks again!

09-28-2005, 03:44 AM
Quick recommendation:

var edgeoffset=0

Change the value to -5

It should help move the menu down a bit. Good luck

09-28-2005, 09:51 AM
Thanks J-Max, I eventually set it to -2 which I think looks better.