Tagged: iframe mobile
I added an iframe code to my website in a text box, and it works well on desktop. However, it’s not displaying on mobile devices. What could be causing this issue?
The code is : <iframe style=”position: absolute; left: 0; right: 0; top: 0; border-radius: 15px; border: 0; margin: 0 auto;” src=”https://3d-configurator.arimars.com/arimars/AutumnSeasonTshirt” width=”560″ height=”500″></iframe>
Hey yoncay,
Thank you for the inquiry.
You may need to wrap the iframe in a container and then apply a minimum height to that container.
Example:
<div style="min-height: 500px; position: relative;">
<iframe
style="position: absolute; left: 0; right: 0; top: 0; border-radius: 15px; border: 0; margin: 0 auto;"
src="https://3d-configurator.arimars.com/arimars/AutumnSeasonTshirt"
width="560"
height="500">
</iframe></div>
Best regards,
Ismael
width and height are set in the iframe – the only thing to change is the positioning as Ismael mentioned above.
I would change the width to 100%
<iframe style="position: relative; left: 0; right: 0; top: 0; border-radius: 15px; border: 0; margin: 0 auto;"
src="https://3d-configurator.arimars.com/arimars/AutumnSeasonTshirt"
width="100%"
height="500">
</iframe>