Hey, How can i change pop-up link to a button in dawn theme like this:-
Please help. Thanks in advance!
A user wants to convert a pop-up link into a button in Shopify’s Dawn theme and provides a reference image showing the desired result.
Two solutions were offered:
CSS Approach (MandasaTech):
.product-popup-modal__button and .product-popup-modal__opener classesHTML/Liquid Approach (sunilthakor):
main-product.liquid section fileproduct-popup-modal__button class within the main-product.liquid fileBoth solutions aim to transform the link element into a styled button component. The user shared their store URL for reference.
Hey, How can i change pop-up link to a button in dawn theme like this:-
Hi suryagoswami7 sir can you share the shop link?
Hello @suryagoswami7
Go to Online store >> Edit code >> Assets >> base.css
Add this code below of base.css file
.product-popup-modal__button {
justify-content: center;
align-items: center;
border: 0;
padding: 0 3rem;
cursor: pointer;
font: inherit;
font-size: 1.5rem;
text-decoration: none;
color: rgb(var(–color-button-text));
transition: box-shadow var(–duration-short) ease;
-webkit-appearance: none;
appearance: none;
background-color: rgba(var(–color-button),var(–alpha-button-background));
width: 100%;
display: flex !important;
border-radius: 10px;
}
.product-popup-modal__opener {
display: block;
max-width: 440px;
}
open “main-product.liquid” section.
search for this keyword “product-popup-modal__button” inside the “main-product.liquid”
replace the button tag with the given code. https://prnt.sc/mN7JrFeRxXQ0