3 replies [Last post]
computerguy
Offline
newbie
Last seen: 14 years 32 weeks ago
Joined: 2007-11-28
Posts: 2
Points: 0

Hey.

I'm having an issue with a drop down menu. I have a search box with a link that when clicked will show a DIV with some filter options.

I am using Prototype to show and hide the div without any issues. The problem I am having is that the new DIV is supposed to show above all the other layers.

Instead it is expanding and pushing the content below it further down. I am not sure what could be the problem.

I have changed the z-index and it is positioned as relative.

I have attached the files needed to view a sample page. I changed the extension of the files so that I could upload them. They should be called default.css, myalerts.html and prototype_1_5.js.

Any help would be appreciated.

AttachmentSize
default.txt5.01 KB
myalerts.txt3 KB
prototype_1_5.txt69.59 KB
Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 4 years 51 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

it should be

it should be position:absolute and then you might have to set it's parent as position: relative to contain it.

Would be nice to see a live demo instead of code though.

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

computerguy
Offline
newbie
Last seen: 14 years 32 weeks ago
Joined: 2007-11-28
Posts: 2
Points: 0

Thanks. That did the

Thanks. That did the trick.

Could you explain why that the parent has to be relative and the child has to be absolute?

I'm a newbie trying to learn as fast as I can.

I couldn't post it to a live site as I don't have a web hosting account. This was a work related question.

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 4 years 51 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

http://www.w3.org/TR/CSS21/vi

http://www.w3.org/TR/CSS21/visuren.html#x19

Might help explain some stuff.

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph