Reputation: 39
I want to show a previous and next div
over flash content which is opening in iframe.I have tried all the wmode=opaque
or wmode=transparent
or wmode=window
, but fail to work in IE8.
I can't add because flash content is coming from other site. I am loading the other site in iframe
.
Upvotes: 3
Views: 127
Reputation: 17171
DEMO: http://jsfiddle.net/pjgxt/2/
<div id="container">
<div class="controls prev">prev</div>
<iframe src="//www.youtube.com/embed/PbsaHzIokEE" frameborder="0" ></iframe>
<div class="controls next">next</div>
</div>
#container {
position: relative;
width: 400px;
padding-left: 100px;
padding-right: 100px;
border: 1px solid red;
}
.controls {
position: absolute;
width: 100px;
height: 100px;
top: 50px;
background-color: lime;
z-index: 10;
}
.prev {
left: 50px;
}
.next {
right: 50px;
}
iframe {
width: 100%;
height: 200px;
position: relative;
z-index: 5;
}
z-index
controls the layering of elements.z-index
to elements that have a position
of relative
or
absolute
.Upvotes: 3