I
I
Igor Pavlenko2016-04-22 14:34:43
YouTube
Igor Pavlenko, 2016-04-22 14:34:43

How to make youtube video responsive?

How to make a YouTube video block responsive so that black bars do not appear?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
Gleb Kemarsky, 2016-04-22
@glebkema

Habr. The simplest adaptive layout techniques :

<div class="video">
  <iframe src="//www.youtube.com/embed/b7deZTDDEbs?rel=0&amp;showinfo=0" 
  frameborder="0" allowfullscreen></iframe>
</div>

.video {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
}
.video iframe, .video object, .video embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

S
Sergey, 2016-04-22
@gangstarcj

So?

S
Stas Grib, 2017-03-06
@webstolica

does not work in OcStore 2.3

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question