Shopify themes, liquid, logos, and UX
Hi! How do I retain this position (text next to image) similar to desktop for mobile version, and reduce the font size for mobile?
Hi @nicolewx ,
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code just above tag </body>
<style>
@media only screen and (max-width: 600px) {
#shopify-section-template--17647482142973__image_with_text_czkqze .grid--1-col .grid__item {
width: 50%;
max-width: 50%;
}
#shopify-section-template--17647482142973__image_with_text_czkqze .image-with-text__media img {
object-fit: contain;
}
#shopify-section-template--17647482142973__image_with_text_czkqze a.button.button--primary {
font-size: 1.2rem;
padding: 0.5rem;
}
#shopify-section-template--17647482142973__image_with_text_czkqze .image-with-text__content{
padding: 0.5rem;
font-size: 1.2rem;
}
}
</style>
Result:
If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!
Best Regards,
Makka
Hi @nicolewx
Check this one.
From your Shopify admin dashboard, click on "Online Store" and then "Themes".
Find the theme that you want to edit and click on "Actions" and then "Edit code".
In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
@media only screen and (max-width: 749px){
.section-template--17647482142973__image_with_text_czkqze-padding .grid--1-col .grid__item {
max-width: 50%;
}
div#ImageWithText--template--17647482142973__image_with_text_czkqze .subtitle {
font-size: 1.2rem;
}
div#ImageWithText--template--17647482142973__image_with_text_czkqze {
padding: 10px;
}
.image-with-text__media.image-with-text__media--adapt.global-media-settings.background-transparent.media img {
object-fit: contain;
}
.section-template--17647482142973__image_with_text_czkqze-padding a.button.button--primary {
padding: 0px;
}
.section-template--17647482142973__image_with_text_czkqze-padding .image-with-text .grid {
flex-direction: row-reverse;
}
}
And save.
Result:
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024