views:

99

answers:

3

If I had a bunch of absolute positioned divs and they overlapped, how would I get a certain div to come to the front? Thanks again guys!

A: 

Use .css() and apply position attribute and z-index attribute.

airmanx86
Alternatively apply a class that has those attribute that you need with jQuery.
airmanx86
+1  A: 

This is a CSS thing, not a jQuery thing (though you can use jQuery to modify the css).

$('element').css('zIndex', 9999);

Or, absolute positioning will bring something to the top;

$('element').css('position', 'absolute');
Kerry
i think you will need both, so position:absolute AND z-inde:1
Amr ElGarhy
+1  A: 

It would be overkill to use jQuery for this. Instead use CSS' z-index property:

<style type="text/css">
  #myElement {
    z-index: 50000;
  }
</style>
Gert G