Closed Bug 298602 Opened 20 years ago Closed 20 years ago

Positioning Javascript does not work in Mozilla with newer Doctypes

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: ortsed, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/312.1 (KHTML, like Gecko) Safari/312 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; rv:1.7.3) Gecko/20041001 Firefox/0.10.1 At the bottom of the page is a floating DHTML menu. It can work in all browsers without a Doctype or an outdated Doctype (HTML 2.0). It can only work in IE with a current Doctype (HTML 4.0 transitional, strict, XHTML..etc..). When it has a current doctype, Mozilla is able to display or hide the menu, but it is not able to use Javascript to position the menu. The value window.document.getElementById('aboutnav').top is returnd as blank. not null, or 0, but just blank. Reproducible: Always Steps to Reproduce: 1. Add current doctype header to document 2. load page and rollover menu nav at the bottom of page ("Sections") 3. You can see that the menu is appearing at the top of the page, by quickly scrolling upscreen to see the menu near it's default position (0,0) Actual Results: Menu appears a top of screen rather than it's Javascript determined location. Expected Results: Placed the menu directly above the black bar navigation at the bottom of the page.
Summary: Positioning Javsacript does not work in Mozilla with newer Doctypes → Positioning Javascript does not work in Mozilla with newer Doctypes
The JS includes a lot of lines like this: document.getElementById('sectionsnav').style.left=adjusted+35; Notice that no units are specified as required by the CSS standard, e.g.: document.getElementById('sectionsnav').style.left=adjusted+35+'px'; See: http://www.mozilla.org/docs/web-developer/quirks/ So probably INVALID, but since I haven't done anything but scan the code, I'll leave this open for the moment.
Yep that did it. Thanks pike!
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Glad you got it sorted out. p.s. Correcting resolution.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.