views:

1057

answers:

2

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
That's not what float: does.
Oli
+1  A: 

It's possible but not entirely simple. I've done it before here (the video hover-overs).

The concept basically goes:

  1. 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.
  2. Create a new element, style it similarly with the same dimensions and position it right above your current element using position:absolute and z-index:...
  3. use slideDown (or alter the height, again, depending on what makes most sense) and it should be above the rest of your content
Oli
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