Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Menu with rel. and abs. positioned divs in tables don't work in NN4.x

Status
Not open for further replies.

superslurpee

Programmer
May 15, 2002
108
Hi,

I've got a good ol' Netscape 4.x problem with nested tables and divs. Of course everything I'm doing works peachy in NN6 and IE but I need it to work in Netscape 4 as well.

I'm working on a page (previously made) with a nice drop down menu of images (it's not a main menu, but part of the page for explanation of various topics). Anyways, it works as one unit and needs to placed together.

The current structure is:
Code:
<div>
<table>
<table>
<table>
<div style=&quot;position:relative&quot;><!--TO PLACE MENU IN CONTENT-->
<div style=&quot;position:absolute&quot;></div> <!--ALL MENU PARTS-->
</div>
</table>
</table>
</table>
</div>

The current structure works fine in anything other than NN4.x and works the way we want (if text size is increased by user, we want the menu to move to accomodate it, which it does). In NN4.x however, the relative div to place it where we want is ignored and the entire menu moves to the top of the page almost as if it's just seeing the absolutely positioned divs.
How do I get that menu to be placed in the same location as in other browsers (ie. inside the content tables) rather than pulled out of context and placed at the top?

I think NN4.x should be put to sleep!

Thank you for any ideas anyone can offer.
 
I'm beginning to ignore Netscape 4.x users.
On our sites at least we never get more than 0.5%
of all users actually using the bugger of a browser.
Not worth all the extra work in my opinion. Sometimes I can spend as much time on netscape fixes as I can on the whole site.

That didn't really deal with your problem did it?

hmmm...

OK....u need to use px when placing the div's.
This seems to work for our site:

(after u click on enter site)

Maybe the code here will help u...

Feel free to take a look and nick it if need be..

Regards,

Thomas Shearer
Web Developer
 
Hey,

Thanks for the response! I'd like to forget NN4.x as well! The site we're working on is a government site and we're the 'flagship' for accessibility. Therefore pixels are reduced to images only (or as little as possible). But that causes a problem in that NN4.x doesn't like relative sizes. Arggggg.... The other problem is that we have a much higher use of NN4.x hitting the site than you appear to. As this is the government, we have a very wide user base including the disabled who are much more likely to be using NN4.x than anything higher.

Anyways, it all causes problems. I took a look at your site and it's very nice. I like it muchly! Our problem is the mixing of tables and divs rather than straight divs alone (which I would like much more). It almost feels like NN4.x is holding the web back from being what it really could be!

Take care,
 
There is a simpler solution to your problem. While IE uses left, top, bottom, right, to position things using the style tag. NN uses screenX and screenY.

So what you do to make it work in both is simply add both values into the style list. IE will ignore the ones it doesn't use, and NN will ignore the ones it doesn't.

style=&quot;positon:absolute; top:5px; screenY:5px; left:10px; screenX:10px;&quot;

This should work in both. I am in the same boat you are in, with the government requiring support for both. Try this out, and let me know how it worked for you. The money's gone, the brain is shot.....but the liquor we still got.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top