473,662 Members | 2,524 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with Javascript drop-down menu

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
3 1235
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
7706
by: Lucy | last post by:
help! javascript inline of an HTML to open an HTML in a target window. Something like... <html> <head> <title>test</title> </head> <body>
7
2167
by: Stephen | last post by:
I have some code which I call from a custom validator however I seem to have got the logic wrong and im having trouble figuring out how to write my code to get things to work the way I require. Below is the script I currently use and what it does along with what I would like it to do. Can someone please help me work how I can fix this. <script> function ValidateDropDownOrCheckBox(sender, args) { if ( document.forms.DropDownList1.value...
2
2351
by: arjenmeijer | last post by:
I am using the Drag & Drop Sortable Lists with javaScript and CSS from http://tool-man.org/examples/sorting.html. It works beautifully in a single page, see http://www.molca.com/kkoke.html. However, if I load the page in a Iframe the list is not sortable. The javascript gets stuck, see http://www.molca.com/kknotoke.html. I have searched the complete Internet, but I can not find a reference to this particular problem. What is the basic idea...
24
6321
by: firstcustomer | last post by:
Hi, Firstly, I know NOTHING about Javascript I'm afraid, so I'm hoping that someone will be able to point me to a ready-made solution to my problem! A friend of mine (honest!) is wanting to have on his site, a Javascript Calculator for working out the cost of what they want, for example: 1 widget and 2 widglets = £5.00
7
8923
by: Papelotte | last post by:
Hi all, I'm new to this forum and I am hoping that there is someone here who can help me. I have an ASP page that has javascript that works perfectly in IE, but not in Firefox. Can anybody tell me how to get it to work in FF. I can insert a browser identifier and redirect if the script has to change for FF only. Basically, when a vistor goes to the page they are asked to click on images to chose the top 3 that they like - the images...
1
2089
by: danxavier | last post by:
I successfuly installed dd.php and sajax.php files. It runs fine, but I would like to link the $items to an image. I called the field in mysql with the link "pic". Any help would be AWESOME!!! I've run out of ideas. Here's the script <?php /* CREATE TABLE `layout` ( `set` varchar(50) NOT NULL default '', `item` varchar(50) NOT NULL default '', `order` int(9) NOT NULL default '0',
1
1640
by: sujithegr8 | last post by:
HIii... Its me sujith i've done something with AJAX. but for the rest i need someo ones help.. i've done half the work. there are two tables. "ajax1" and "ajax2" (check db.sql)
1
2556
by: kidelectric | last post by:
The issue I am having is that I would like to be able to drag-and-drop div elements that have rounded corners.* Since these elements will be dynamically created (including background color), I could not use the "standard" rounded corner method of sliced images for the corners (since that would only allow a certain color to match) I tried using a corner-rounding js tool from http://openrico.org, but it failed miserably (in both IE and Opera) ...
12
1582
by: lorlarz | last post by:
Unobtrusive JavaScript leads to BUILDERS (e.g. drag drop activity builder) Once you totally remove JS from a web page, and learn the shortcuts and efficiencies provided by a library like jQuery, one realizes that one can build generalized builders of JavaScript applications. One example is: Universal Automatic Drag-and-Drop Activity Builder (builds the code
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8344
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8764
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8546
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7367
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1993
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.