/    Sign up×
Community /Pin to ProfileBookmark

Javascript menus broken under Firefox if correct W3C validator is used

This annoying problem is only happening under Firefox. IE displays the page fine.

So here it is. This page – [url]http://www.leonardi.adv.br/indexteste.html[/url] – has the correct DOCTYPE referente, which is as follows:

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
http://www.w3.org/TR/html4/loose.dtd“>

You will notice that, under Firefox, the javascript menus on that page all show up on the left side instead of showing right under each option, which is the way it is supposed to be.

For instance, this other page – [url]http://www.leonardi.adv.br/andamentos.html[/url] – has only the DOCTYPE reference, without the URL, but it displays the menus just fine under Firefox, IE and whatever else.

What I have noticed, so far, is that the menus on indexteste.html load fine under IE but crap under Firefox, whereas andamentos.html, which is essentially the same code except for the URL referente, displays the menus just fine under either browser.

What could be causing this?

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@Me_ClumsyauthorAug 10.2004 — Anyone? I am still stumped.
Copy linkTweet thisAlerts:
@dragleAug 10.2004 — Hi,

To be valid assignments, the left and top properties need length specifications; i.e., change your positioning statements to something like this:
<i>
</i>document.getElementById(LayerID).style.left = (xPos - 4) + "px";

Cheers!
Copy linkTweet thisAlerts:
@Me_ClumsyauthorAug 11.2004 — Thank you very much, I don't know why exactly it worked, but just adding the "px" parameters to both lines fixed it.
×

Success!

Help @Me_Clumsy spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...