Iframe to embed images not working

christiaanbekkerartist
37 Posts
christiaanbekkerartist posted this 30 December 2020
Ask a Question

Hi - I'm trying to embed images with an iframe but I can't get the width and height to be responsive. I've tried to set the width to 100% but it is not responsive for mobile devices.

Here is an example. Scroll all the way down in this link:

https://advertisingwholesaler.com/mystore/

TIA

Hi - I'm trying to embed images with an iframe but I can't get the width and height to be responsive. I've tried to set the width to 100% but it is not responsive for mobile devices. Here is an example. Scroll all the way down in this link: https://advertisingwholesaler.com/mystore/ TIA
Vote to pay developers attention to this features or issue.
9 Replies
Order By: Standard | Newest
christiaanbekkerartist
37 Posts
christiaanbekkerartist posted this 02 January 2021

Any ideas?

Any ideas?
Support Team
Support Team posted this 04 January 2021

Hi,

You cannot control the appearance of the elements inside the frame from the website stylesheet. Therefore the image should be configured as a responsive image on the page inside the iframe directly.
Please let us know if you have any further questions.

...................................................
Sincerely,
Olivia
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi, You cannot control the appearance of the elements inside the frame from the website stylesheet. Therefore the image should be configured as a responsive image on the page inside the iframe directly. Please let us know if you have any further questions. ................................................... Sincerely, Olivia Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
christiaanbekkerartist
37 Posts
christiaanbekkerartist posted this 07 January 2021

Thanks. I've been trying to make changes to the iframe in the html block on the right side.

Thanks. I've been trying to make changes to the iframe in the html block on the right side.
Support Team
Support Team posted this 08 January 2021

Hi Christiaan,

The iframe container itself takes the 100% width but the content it loads (the image) does not take that width as the styles for the iframe content should come from inside the iframe code. And the image that is loaded inside the iframe is wider than the iframe container.
Why can't you add the image simply as an image and not as an iframe?

...................................................
Sincerely,
Hella
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi Christiaan, The iframe container itself takes the 100% width but the content it loads (the image) does not take that width as the styles for the iframe content should come from inside the iframe code. And the image that is loaded inside the iframe is wider than the iframe container. Why can't you add the image simply as an image and not as an iframe? ................................................... Sincerely, Hella Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp

Last edited 14 January 2021 by Support Team

christiaanbekkerartist
37 Posts
christiaanbekkerartist posted this 11 January 2021

Thanks Hella

This is the html code I have in the html block but it isn't responsive:

<div class></div> EDIT: The post strips the div - attached file

I want to change the image externally to many websites at once, hence the iframe

Thanks Hella This is the html code I have in the html block but it isn't responsive: &lt;div class&gt;&lt;/div&gt; EDIT: The post strips the div - attached file I want to change the image externally to many websites at once, hence the iframe

Last edited 11 January 2021 by christiaanbekkerartist

christiaanbekkerartist
37 Posts
christiaanbekkerartist posted this 11 January 2021

I resolve the issue by embed the image into an html file and then pull the html into the iframe code in the nicepage html box

Thank you

I resolve the issue by embed the image into an html file and then pull the html into the iframe code in the nicepage html box Thank you
Support Team
Support Team posted this 12 January 2021

Hi Christiaan,

Nice to hear that everything is fine now. Feel free to contact us on any occasion.

...................................................
Sincerely,
Hella
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi Christiaan, Nice to hear that everything is fine now. Feel free to contact us on any occasion. ................................................... Sincerely, Hella Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
christiaanbekkerartist
37 Posts
christiaanbekkerartist posted this 12 January 2021

Thanks Hella

I now have to issues. I can't get rid of the blank space below the image and I can't resize the images.

Here is my html code I have in my nicepage. Same link as in my original post.

<div class </iframe>

CSS Class:

wrapper

Code:

.wrapper {
position: relative;
padding-bottom: 100%; /* 16:9, for an aspect ratio of 1:1 change to this value to 100% */
}
iframe{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;

}

My code in the page I'm calling into the iframe is:

<img src width height padding-top>

Thanks Hella I now have to issues. I can&#39;t get rid of the blank space below the image and I can&#39;t resize the images. Here is my html code I have in my nicepage. Same link as in my original post. &lt;div class &lt;/iframe&gt; CSS Class: wrapper Code: .wrapper { position: relative; padding-bottom: 100%; /* 16:9, for an aspect ratio of 1:1 change to this value to 100% */ } iframe{ position: absolute; top: 0; left: 0; width: 100%; height: 100%; } My code in the page I&#39;m calling into the iframe is: &lt;img src width height padding-top&gt;
Support Team
Support Team posted this 14 January 2021

Christiaan,

Try setting the image size with the CSS

iframe img.img1 {
height: 100px; // image height
width: 100px; // image width
margin-bottom: -20px; // if needed to remove the space
}


...................................................
Sincerely,
Allen R.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Christiaan, Try setting the image size with the CSS iframe img.img1 { height: 100px; // image height width: 100px; // image width margin-bottom: -20px; // if needed to remove the space } <img src="" class="img1"> ................................................... Sincerely, Allen R. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
You must log in or register to leave comments