Hi! How do I retain this position (text next to image) similar to desktop for mobile version, and reduce the font size for mobile?
Topic summary
Goal: Keep image and text + button side-by-side on mobile and reduce mobile font size. The post includes screenshots that are central to understanding the desired layout.
Proposed solutions:
- Edit theme.liquid: One reply suggests adding a code snippet just above via Online Store > Edit code > theme.liquid. A result screenshot is shown, but the actual code content is not visible in the post.
- Add mobile-only CSS: Another reply provides a @media (max-width: 749px) CSS block in base.css/style.css/theme.css that targets the specific Image with Text section selectors. Changes include: setting grid items to 50% width to display image and text side-by-side, reversing order (row-reverse) to match desktop, reducing subtitle font-size to 1.2rem, adjusting section and button padding, and setting images to object-fit: contain.
Notes:
- “@media” is a CSS media query that applies styles only under a specified screen width (mobile).
- The CSS uses section-specific IDs/selectors, so it targets that particular section instance.
Status: No confirmation from the original poster; resolution unconfirmed and discussion remains open.
Hi @nicolewx ,
Follow these Steps:
- Go to Online Store
- Edit Code
- Find theme.liquid file
- Add the following code just above tag
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!



