Question

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 ?

Was it helpful?

Solution

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

OTHER TIPS

Try floating your elements. If they are div's they should slide over one another.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top