1

With CSS it's possible to stretch an image and change the ratio to fully cover the parent div. The image will even resize if the parent is responsive. It is possible to do so with a video (iframe)?

EDIT: I want to make sure I won't get black bars. EDIT: Altered title as this problem concerns a video and the duplicate answer does not.

josh
  • 115
  • 1
  • 12

3 Answers3

-1

Yes. you can give the iframe and id, and them costumise the id in your css file. simply just type the following code:

.theid {
width : 100% ;
height : 100% ;


}

and you are done

-1

Hmm.. Did you try to put the video on a div, and apply width=100% to the video?

Something like this:

<div class="parent">
    <iframe class="child"></iframe>
</div>

And the CSS:

.parent{
    width: 600px //your width here
}
.child{
    width: 100%;
}
silver
  • 64
  • 1
  • 1
  • 8
-1

You could add width="100%" height="100%" to the iframe. doing so will make the iframe stretch the length of the parent div.

Nique Joe
  • 492
  • 5
  • 18