Search code examples
jqueryhtmlcsscycle

jQuery Cycle plugin z-index float problem


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' /> 

Solution

  • 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