Help with Javascript drop-down menu

T

Timmah1980

I'm sure this is a simple enough fix for someone out there, but I'm
afraid it's beyond me!

I'm putting together this simple menu for a client:

http://www.timkeay.co.uk/mpc2/index.htm

It works fine, but I'd like to make a couple of tweeks. As you can see,
the sub-menus don't sit exactly in line with the header, so I'd like to
shift them right by one pixel to correct this. I'd also like to shift
them up one pixel, to remove the apparent double line between the
header and the sub-menu, but this isn't as essential as getting them
lined up properly.

The two javascript files are here:

http://www.timkeay.co.uk/mpc2/js/menu_var.js
http://www.timkeay.co.uk/mpc2/js/menu_com.js

Have posted this problem previously and had a kind reply from someone
suggesting to start from scratch with a CSS-based menu. However, I'd be
very grateful if someone could take a look at the actual javascript
code and let me know how to fix it.

Thanks a lot,

Tim
 
T

Tom Cole

FWIW

In I.E. they do line up, exactly. In Firefox they're off 1 pixel. In
Opera, they're missing the right and lower borders entirely.

I.E. still constitutes over 60% of browsers (by most references, with
some variation). Firefox makes up roughly 30%, the rest can fight over
the 10 that's left...

When you change your menu to shift one space to the right, it will now
be offset in 60% of the viewers' eyes, not 30%. Shifting will not help
the other 10% that are missing borders anyway. Your problem will be
worse (as far as percentages are concerned), unless you mandate that
your viewers use Firefox.

That just my $.02.
 
A

ASM

Timmah1980 a écrit :
I'm sure this is a simple enough fix for someone out there, but I'm
afraid it's beyond me!

I'm putting together this simple menu for a client:

http://www.timkeay.co.uk/mpc2/index.htm

It works fine, but I'd like to make a couple of tweeks. As you can see,
the sub-menus don't sit exactly in line with the header, so I'd like to
shift them right by one pixel to correct this. I'd also like to shift
them up one pixel, to remove the apparent double line between the
header and the sub-menu, but this isn't as essential as getting them
lined up properly.

The two javascript files are here:

but without a real stylesheet ... how to find what do what ?
Wich human can turn this soup?

LisTamatic examples :
http://css.maxdesign.com.au/listamatic/horizontal02.htm
and follow all next examples

hrizontal expandable menu with little delay :
http://dosimple.ch/articles/Menus-dynamiques/menuHorizontal.html
Have posted this problem previously and had a kind reply from someone
suggesting to start from scratch with a CSS-based menu.

Ha ! So I'm not alone.
However, I'd be
very grateful if someone could take a look at the actual javascript
code and let me know how to fix it.

Seriously
- your code is very much too complex I could find something.
- learn CSS ad use them.
 
T

Timmah1980

Thanks Tom.
In I.E. they do line up, exactly. In Firefox they're off 1 pixel.

Yeah, I noticed this shortly after posting. I use FF myself, but am
aware the best option is to make it look right in IE. It's for a local
church website, so most users will be Microsoft standard-install
people, rather than installing their own (better) browser.
I.E. still constitutes over 60% of browsers (by most references, with
some variation). Firefox makes up roughly 30%, the rest can fight over
the 10 that's left...
When you change your menu to shift one space to the right, it will now
be offset in 60% of the viewers' eyes, not 30%. Shifting will not help
the other 10% that are missing borders anyway. Your problem will be
worse (as far as percentages are concerned), unless you mandate that
your viewers use Firefox.

I've had a friend look at it, who managed to shift them up one pixel,
but he basically said the same thing about shifting it right one pixel.
So, thanks...very good advice! ;o)

Also, thanks to "ASM" for the link - will look into it.
And when I find someone to turn your soup, I'll let you know! ;o)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top