ahjdwoor Posted January 7, 2018 Share Posted January 7, 2018 I have a website where I want to have a Prestashop in and iFrame. But it dosent scale to the mobile version, Data about screen width isn't transferred to website inside a iframe. HTML: <iframe src="http://foo-webshop.dk/"></iframe> CSS: <style> iframe { display: block; height: 93vh; width: 100%; border: none; margin: 0px auto; } </style> The website inside the frame is responsive and works great outside the iframe. Its not responsive inside the iframe. Anyone have a solution? Link to comment Share on other sites More sharing options...
ahjdwoor Posted January 8, 2018 Author Share Posted January 8, 2018 Anyone ??? Link to comment Share on other sites More sharing options...
Martin Mi Posted April 19, 2020 Share Posted April 19, 2020 (edited) Hello, Ahjdwoor! This is the code you can use to Include the video: <div class="videoWrapper"> <iframe width="640" height="360" src="https://www.youtube.com/embed/3G1PFLuTrgM" frameborder="0" allowfullscreen></iframe> </div> And the CSS which I pasted into Customer section in Alysum template but you can also find different ways how to edit main template CSS file: .videoWrapper { position: relative; padding-bottom: 56.25%; /* 16:9 */ padding-top: 25px; height: auto !important; } .videoWrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } This should be working well to provide dynamic iFrames that scale well on different displays. Best Regards, Martin Mi E-shop & E-commerce Agency www.dataquo.eu Edited May 20, 2020 by Martin Mi (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now