I have a div where I click on a link to slideDown. As expected it does what it promises however, I prefer it to slide open without pushing the other elements down as well. so like a layer on top of other layers. is this possible ?
A:
Try floating your elements. If they are div's they should slide over one another.
adam
2009-01-20 16:04:30
That's not what float: does.
Oli
2009-01-20 16:06:29
+1
A:
It's possible but not entirely simple. I've done it before here (the video hover-overs).
The concept basically goes:
- Set position relative on your current element (the one you're floating, or its parent if that makes more sense). This can be statically set in your CSS.
- Create a new element, style it similarly with the same dimensions and position it right above your current element using
position:absolute
andz-index:...
- use slideDown (or alter the height, again, depending on what makes most sense) and it should be above the rest of your content
Oli
2009-01-20 16:05:55
I've actually done it several times on that page. I used a similar technique for the slide selector and the menu uses a reverse version.
Oli
2009-01-20 16:07:33