jQuery Cycle plugin z-index float problem

Antony Carthy picture Antony Carthy · May 18, 2009 · Viewed 10.5k times · Source

When I try to place an element on top of my jQuery Cycle element, it doesn't work. The element is always behind the jQuery cycle element. I use float: right; to position the element, and set its z-index to 100000, to no avail.

Firebug sees the Cycle element and its children as having low z-indexes, and shows the floating element to be in the right place.

The element never shows above the Cycling images.

<!-- the cycling set -->
<div id='headerimages'>
    <img src='images/header1.jpg' alt='' style='' />
    <img src='images/header2.jpg' alt='' style='' />
    <img src='images/header3.jpg' alt='' style='' />
</div>
<!-- the floating element -->
<img src='images/logotransparent.png' alt='' id='logo' /> 

Answer

vsync picture vsync · May 18, 2009

floating doesn't trigger z-index, only
Position: Relative and position: Absolute

so try these.. you might want to try adding position:relative,
it won't effect anything most of the time, but will give you access to z-index