Forum Moderators: open
I'm developing a site (my first really big one) using Javascript navigation menus. Everything with the menus was working well until I did some work on trying to make my pages validate for HTML4.01 Transitional. The main page of the site validates (I only had to change the full DOCTYPE and one or two meta tags now, however, my lovely menus (which drop down from a menu bar near the top of the page) display beautifully in Opera and IE, but Netscape 6 and 7 now show each menu butted up right against the top left of the window, whichever one I mouse over. If I made the simple change to putting the DOCTYPE back to how it was, the menus work fine in Netscape. Also, Netscape 6 drops the bar from which the menus come down a few pixels with the correct DOCTYPE in place, but 7 leaves that where it should be.
Could anyone point me in the direction of some information that might explain why this might be happening.
Thanks in advance
Wishful
I experienced a similar problem before. Try to map your menu to a div tag, try something like
<div id='some_id' style='position:relative; width:?; height:?;'>
insert a transparent image here with width and height the same as within the div tag
</div>
Now create some javascript to map the menu to the div tag
hope this helps
I used a nested div approach and if I remember right absolute positioning. The positioning was a bit of a trick to get right across browsers, and I seem to recall discovering that I couldn't line the new div's up with their parents propperly with both IE and anything else, because IE used it's own DOM instead of the official one, so the right objects weren't there. I *think* Opera supports more of the IE perversions of the DOM than Gecko, so it's possible you're running into the same thing.
Hope that helps at least a little. I'll see if I can dig up that menu code for you, but since the whole site got scrapped a month or so later I'm not too confident.