2

I wrapped the iframe with the below <div> classes, but no matter where I put the CSS, it doesn't pick up the CSS,it just isn't working

HTML:

<div class="auto-resizable-iframe">
  <div>
    <iframe frameborder="0" allowfullscreen="" src="//www.youtube.com/embed/{$id}"></iframe>
  </div>
</div>

And here is the CSS, I tried putting it in global.css, and every other css area, but nothing....

.auto-resizable-iframe {
  max-width: 820px;
  margin: 0px auto;
}

.auto-resizable-iframe > div {
  position: relative;
  padding-bottom: 75%;
  height: 0px;
}

.auto-resizable-iframe iframe {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
}
Shadow The GPT Wizard
  • 66,030
  • 26
  • 140
  • 208
Chaz Steiner
  • 447
  • 2
  • 5
  • 11
  • "it just isn't working". Have you tried looking in DevTools to see if your styles are being applied? Maybe your styles don't have the effect you're expecting them to have. – xrisk Sep 10 '17 at 22:04
  • Hi, @Rishav, thanks for answering, definitely looking at dev tools, and using codepen, it works fine on codepen but not working on MyBB, I am very familiar with css and never had this issue, usually you can put the css in global.css or just use inside the template but nothing, so weird. – Chaz Steiner Sep 10 '17 at 22:08

0 Answers0