By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,598 Members | 1,897 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,598 IT Pros & Developers. It's quick & easy.

Help with Javascript drop-down menu

P: n/a
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

Sep 6 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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.

Timmah1980 wrote:
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
Sep 6 '06 #2

P: n/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-dy...orizontal.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.
--
Stephane Moriaux et son [moins] vieux Mac
Sep 6 '06 #3

P: n/a
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)

Sep 7 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.