Shopify themes, liquid, logos, and UX
How do I make the button smaller only on the iphone page? I have tried codes I have seen in the community but it is not working for me.
Hi @gladamagar
Would you mind to share your Store URL website? with password if its protected. Thanks!
Hello @gladamagar
To make a button smaller only on the iPhone page, you can use CSS media queries to target specific screen sizes, such as those commonly associated with iPhones. Here's a general outline of how to achieve this:
Identify the Button: First, identify the button you want to make smaller. Note its class or ID, which you can find in your HTML or CSS code.
Create a Media Query: Use CSS media queries to specify the screen size at which you want the button size to change. For iPhones, you might target screen widths commonly associated with them, like those below 768px for portrait orientation.
@media (max-width: 767px) {
/* CSS for smaller button size on iPhones */
.your-button-class {
font-size: 14px; /* Adjust the font size to make the button smaller */
padding: 5px 10px; /* Adjust padding to control button size */
}
}
Apply the CSS: Insert this CSS code into your theme's custom CSS editor. Be sure to save your changes.
Test Responsiveness: Preview your website on different iPhone models and orientations to ensure that the button size changes as expected.
Remember to clear your browser cache or use private browsing mode to ensure you see the updated styles when testing on your iPhone. If the button size still doesn't change, double-check the class or ID used in the CSS selector and ensure there are no conflicting styles from other CSS rules.
Thanks
bonjour je n'y arrive pas c'est possible de vous contacter en privé ?
Hi @gladamagar
This is Noah from PageFly - Shopify Page Builder App
Please add this code to your theme.liquid above the </head> to get this solved
Step 1: Online Stores > Themes > More Actions > Edit code
Step 2: click on theme.liquid and paste the code above the </head>
<style>
.banner__buttons a {
min-height: 30px;
}
</style>
Hope this can help you solve the issue
Best regards,
Noah | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
Bonjour, cela réduit la taille sur la hauteur mais pas la largeur du bouton. Serait-il possible de vous contacter en privé pour savoir comment réduire que sur mobile la taille ?
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025