Jump to content

Prestashop responsive in iframe


ahjdwoor

Recommended Posts

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

  • 2 years later...

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 by Martin Mi (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...