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

Simple Javascript Tweek

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

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

Sep 5 '06 #1
Share this Question
Share on Google+
4 Replies


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

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Sep 5 '06 #2

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

<snip>
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.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Sep 5 '06 #3

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

Sep 5 '06 #4

P: n/a
(Apologies for double post - browser froze up during send)

Sep 5 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.