my dog learned polymorphism
The moose likes HTML, CSS and JavaScript and the fly likes doubt on div display Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "doubt on div display" Watch "doubt on div display" New topic

doubt on div display

S Chandra Mohan
Ranch Hand

Joined: Oct 19, 2000
Posts: 75
Hi ,
I have a problem in displaying menu using div.
Actually the div gets displayed on mouseover event and the position of the div is absolute.
I have a listbox in the deisplay area.
When the dive gets displayed, the content of the
same gets hidden behind the listbox. hence couldnt view the options properly.
Pls help me out from this problem.
U can also mail me in
thanks in advance
S Chandra Mohan

Have a wonderful day and wish u success<p>S Chandra Mohan<br />
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4351

if you are talking about a <select>, you can set how many items are displayed like this: <select size="2"> which will display only 2 items in the listbox. set the size so it doesnt cover up your menu

Visit my download page
S Chandra Mohan
Ranch Hand

Joined: Oct 19, 2000
Posts: 75
i am not talking about <select> tag....
what i mean is...
i have a menu on the top of every page of
my application. The menu gets activated on
mouseover event and the menu (made of div)
gets hidden by the components available in
the page....
if u want the code i can mail it to u.
Yuriy Fuksenko
Ranch Hand

Joined: Feb 02, 2001
Posts: 413
There is a known bug:
in NS4 layers (you could read it as div's) are always behind any form elements.
in IE4/5 (not sure about 6) List box (SELECT tag) element is alwaus on top of any layer.
Possibly, but not very good solution is:
For IE - you getting coordinates for your menu, looping through all selects on a page, and if it is inside menu location, you hiding it using either visibility=hidden or display=none.
For NS4 it is much more complicated - you could hide/display only layers, each layer must have it's own form. So if you need it for NS4 it is easier to redesign your page layout.
I agree. Here's the link:
subject: doubt on div display
It's not a secret anymore!