max width for iframe in shopify

Solved

max width for iframe in shopify

cbm
Visitor
3 0 0

I have added an external web app in shopify 
I created a new page where I added this code : 
<div style="width: 120%; height: 100vh; margin: 0 -10%; padding: 0; overflow: hidden;">     <iframe src="https://shredder-selector.vercel.app/" style="width: 100%; height: 100vh; border: none; margin: 0; padding: 0;"></iframe> </div>

cbm_0-1720703158018.png

I want it to take max width of page leave no blank spaces

Accepted Solution (1)
Moeed
Shopify Partner
4304 1105 1353

This is an accepted solution.

Hey @cbm 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

<style>
.container.container--narrow {
    max-width: 100% !important;
}
</style>

RESULT:

Moeed_0-1720767785313.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

Need a Shopify Specialist? Chat on WhatsApp


- Custom Design | Advanced Coding | Store Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️

View solution in original post

Replies 5 (5)

suyash1
Shopify Partner
9529 1190 1528

@cbm - can you please share this page link?

Support me | To build shopify pages use pagefly | You are welcome to contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.

Moeed
Shopify Partner
4304 1105 1353

Hey @cbm 

 

Can you share the page link where you have added your iframe?

 

Best Regards,

Moeed

Need a Shopify Specialist? Chat on WhatsApp


- Custom Design | Advanced Coding | Store Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️

cbm
Visitor
3 0 0

Here is the page link of shopify : https://store-airpurifiers.com/pages/test-selector

This is the test page
Here is the link of page that i want to open on iframe : 
https://shredder-selector.vercel.app/

 

Moeed
Shopify Partner
4304 1105 1353

This is an accepted solution.

Hey @cbm 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

<style>
.container.container--narrow {
    max-width: 100% !important;
}
</style>

RESULT:

Moeed_0-1720767785313.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

Need a Shopify Specialist? Chat on WhatsApp


- Custom Design | Advanced Coding | Store Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️
cbm
Visitor
3 0 0

Hi Moeed Thanks alot it helped me solve my issue 
Although now a new problem has encountered : https://store-airpurifiers.com/pages/test-selector
Now my iframe and webpage both are scrolling together which is making it difficult for user to use that external app , can you suggest some changes to it or if we can remove this particular footer then only iframe will be scrollable , what saY?