Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Help with Javascript drop-down menu

Reply
Thread Tools

Help with Javascript drop-down menu

 
 
Timmah1980
Guest
Posts: n/a
 
      09-06-2006
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

 
Reply With Quote
 
 
 
 
Tom Cole
Guest
Posts: n/a
 
      09-06-2006
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


 
Reply With Quote
 
 
 
 
ASM
Guest
Posts: n/a
 
      09-06-2006
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
 
Reply With Quote
 
Timmah1980
Guest
Posts: n/a
 
      09-07-2006
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)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript Drop Down Menu Issue. Replacing Text of the Menu Ivann Javascript 1 07-22-2008 08:34 PM
Horizontal Menu and Sub menu in asp.net 2.0 itzikkl ASP .Net 0 03-27-2005 12:50 PM
Start Menu --> Programs Menu help Dennis Computer Support 0 11-02-2004 08:17 AM
Menu and sub-menu in asp.net as windows menus made with vb, delphi, etc..? Vilmar ASP .Net 0 05-27-2004 05:52 PM
Jump Menu (DropDown Menu) in ASP.net. Can someone help me out? Miguel Dias Moura ASP .Net 3 04-03-2004 08:17 AM



Advertisments