0

I have embeded a youtube video on my site here http://jdwebmanagement.com/draft/united_football/ with this code:

<iframe width="664" height="390" src="https://www.youtube.com/v/JfYn1og9p-U?autoplay=1&version=3&loop=1&playlist=JfYn1og9p-U&rel=0" frameborder="0" allowfullscreen></iframe>

The problem is that the "Play Now!" button displays under the video. Also on IE when you click the first thumbnail of the carousel below, the modal displays under the video.

Kara
  • 6,115
  • 16
  • 50
  • 57
James Deadman
  • 191
  • 2
  • 2
  • 15

4 Answers4

0

I suggest you to add another element using something like this:

<iframe></iframe><!--Under this-->
<div>button</div>

And in css :

margin-top:-/*something*/px

and it could work.

Jamie
  • 1,096
  • 2
  • 19
  • 38
0

you can add this code in your style.css

.video-wrapper .play-now 
{
margin-top: -150px;
}

pixel depends where you want to put you image. Hope this will work for you .

0

Your "Play Now!" button is doing exactly what you told it to do. In your css you told ".video-wrapper .play-now" to align at -40px from the bottom of the closest relatively positioned parent, which is ".flex-video". Set ".video-wrapper .play-now" to a bottom that makes sense like 200px.

.video-wrapper .play-now {
      display: block;
      width: 254px;
      height: 115px;
      background: url(../images/play-now.png) no-repeat;
      position: absolute;
      bottom: -40px;
      left: 32%;
      z-index: 10;
}

This needs to be changed to something like:

.video-wrapper .play-now {
      display: block;
      width: 254px;
      height: 115px;
      background: url(../images/play-now.png) no-repeat;
      position: absolute;
      bottom: 200px;
      left: 32%;
      z-index: 10;
}
MichaelG
  • 652
  • 1
  • 10
  • 17
0

You'll need to provide the code for the modal for us to be able to help you better. For the other part of the question, I suppose this is what you are looking for. Modify it to suit your needs:

HTML

<div id="container">
    <iframe width="664" height="390" src="https://www.youtube.com/v/JfYn1og9p-U?autoplay=1&version=3&loop=1&playlist=JfYn1og9p-U&rel=0" frameborder="0" allowfullscreen></iframe>
    <button id="play">Play Now</button>
</div>

CSS

#container{
    position: relative;
}

#play {
    width: 100px;
    height: 100px;
    position: absolute;
    bottom: 10px;
    left: 50%;
    margin-left: -100px;
}

FIDDLE

reggaemahn
  • 6,272
  • 6
  • 34
  • 59