Align Faire iframe widget in custom liquid block

Align Faire iframe widget in custom liquid block

MichelleSpaTech
Excursionist
24 0 10

I am creating a wholesale catalog on my website. To shop, clients have to go to another website (Faire). Faire has a button widget that directs clients to their website to shop. I'd like the button to be aligned to the left so that it's in line with the text above it. How do I do this with CSS?

 

The widget is in a custom liquid block on a product template.

 

Page  URL: https://spatechnologies.com/products/professional-sample-pack

 

Widget code:

<iframe src="https://www.faire.com/embed/bw_qbzzr7tsq4" width="360"
height="64"
scrolling="no" style="margin:0 auto;border:none;display:block;max-width:100%;width:360px;height:64px;"></iframe>

 

Screenshot 2024-08-01 120129.jpg

Replies 7 (7)

BSS-TekLabs
Shopify Partner
2401 695 831

BSSTekLabs_0-1722529798224.png

I can't load it. What's wrong with it now?

 

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)


Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page


BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
MichelleSpaTech
Excursionist
24 0 10

I'm not sure why it wasn't loading for you. I haven't run into that problem.

Asad-Mahmood
Shopify Partner
328 54 63

Replace the iframe code with this

<iframe src="https://www.faire.com/embed/bw_qbzzr7tsq4" width="360"
height="64"
scrolling="no" style="margin:0px;border:none;display:block;max-width:100%;width:360px;height:64px;"></iframe>


and go to your online store -> customize  -> settings -> custom css and paste  this code there

.ldmCfa {
    margin: 0px !important;
}
If my solution has been helpful, you can consider supporting me via Buy Me a Coffee.
Hire me: asadmahmood8470@gmail.com
WhatsApp
Fiver




MichelleSpaTech
Excursionist
24 0 10

Thank you. This moved the button slightly to the left, but it's still not aligned with the text above it.

Asad-Mahmood
Shopify Partner
328 54 63

Replace the iframe code with this and check

 

<div class="Fiare-Widget-Div">
<iframe src="https://www.faire.com/embed/bw_qbzzr7tsq4" width="360"
height="64"
scrolling="no" style="margin:0px;border:none;display:block;max-width:100%;width:360px;height:64px;"></iframe></div>
<style>
@media (min-width: 992px) {
    .Fiare-Widget-Div {
        left: -42px;
        position: relative;
    }
}
</style>



AsadMahmood_0-1722884668448.png

 

 

If my solution has been helpful, you can consider supporting me via Buy Me a Coffee.
Hire me: asadmahmood8470@gmail.com
WhatsApp
Fiver




MichelleSpaTech
Excursionist
24 0 10

That worked for desktop view, but not for mobile. On mobile, it's still centered. 

Asad-Mahmood
Shopify Partner
328 54 63

Go to your online store -> customize -> settings -> custom css and paste this code there 

@media (max-width: 767px) {
    .Fiare-Widget-Div {
        left: -25px;
        position: relative;
    }
}



AsadMahmood_0-1723056923531.png

 

If my solution has been helpful, you can consider supporting me via Buy Me a Coffee.
Hire me: asadmahmood8470@gmail.com
WhatsApp
Fiver