Simple Javascript Tweek

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

I'd be very grateful if someone could take a look at the code and let
me know how to fix this.

Thanks a lot,

Tim
 
R

Randy Webb

Timmah1980 said the following on 9/5/2006 8:00 AM:
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

I'd be very grateful if someone could take a look at the code and let
me know how to fix this.

Start over without all the bloat, browser detection, and make it simple.
As it is, it is way overly complicated for a simple menu.

The menu at:

<URL:
http://www.evolt.org/article/How_to_make_a_simple_CSS_dropdown_menu/17/52030/>

Appears to work the same way in IE7 as it does in Mozilla so hopefully
it won't be long before IE7 goes public and CSS menus can become more
reliable.
 
T

Timmah1980

Thanks for that.

If the browser detection code is easily removed, I'll happily do that
but wouldn't know where to start, so will need advice.

Also, as mentioned in the comments under the article you posted, I'm
tempted not to go for a CSS menu if it's not supported in IE.

Although, the javascript version I'm using can easily be adjusted to
support sub-menus - is this as easily done using the CSS method? I'm
quite a novice when it comes to drop-down menus, especially using CSS,
so more-or-less need step-by-step instructions until I find my feet.

If anyone's able to suggest the requested fixes to my original
javascript code, that'd be much appreciated.

Thanks again,

Tim
 
T

Timmah1980

Start over without all the bloat, browser detection, and make it simple.
As it is, it is way overly complicated for a simple menu.

If the browser detection code is easily removed, I'll happily do that
but wouldn't know where to start, so will need advice.
Appears to work the same way in IE7 as it does in Mozilla so hopefully
it won't be long before IE7 goes public and CSS menus can become more
reliable.

Had a look at the link. Looks much simpler, so thanks for posting. As
mentioned in the comments under the article, however, I'm tempted not
to go for a CSS menu if it's not supported in IE.

The javascript version I'm using can easily be adjusted to support
sub-menus - is this as easily done using the CSS method? I'm quite a
novice when it comes to drop-down menus, especially using CSS, so
more-or-less need step-by-step instructions until I find my feet.

If anyone's able to suggest the requested fixes to my original
javascript code, that'd be much appreciated.

Thanks again,

Tim
 

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,773
Messages
2,569,594
Members
45,123
Latest member
Layne6498
Top