allowfullscreen

an HTML attribute for the iframe tag
  1. Welcome
  2. iframe
  3. YouTube
  4. Examples
  5. Errors
  6. Anecdotes
  7. Questions (11)

iframe

Posted by William on 2016-08-01 00:43:10

Hi,

As soon as I wrap the I-frame in a div (to centre the video) the full screen becomes disabled. Is there an easy way to overcome this?

<div style="text-align: center">
** iframe inserted here **
</div>

Answers

Posted by Leo on 2016-08-12 23:04:36

The fullscreen button should not get disabled when it is contained in a div, even if the div has the text-align attribute. Can you post the complete code with the iframe html?

Posted by William on 2016-08-22 16:00:20

Hi Leo, thanks for reply. It happens with any standard iframe e.g. the YouTube video below. (I've replaced the h-t-t-p-s with ***** as this website doesn't allow those letters to be posted.)

Even if this html code was on a bare page by itself the problem seems impossible to overcome. Wrapped in a div, the full screen is disabled. Remove the div and the full screen becomes accessible again. It's maddening!


<div style="text-align: center">
<iframe width="420" height="315" src="*****://www.youtube.com/embed/m8K-8R8yN_k" frameborder="0" allowfullscreen></iframe>
</div>

Answer this Question

Name:
Answer:

Back to All Questions