Hello!
I have set tried to set a max width for the ‘Image with Text’ element so that it is the same width as the ‘Rich Text’ element above which I am happy with, but the ‘Image with Text’ element is aligned to the left. Is there any code I can add to center align the element? Here is a link to the page that shows the elements I am talking about:
https://batchedcookies.co.uk/pages/about-us
Many thanks,
Liam
@liambeauchamp
oh sorry for that issue can you please try this code
- Go to Online Store->Theme->Edit code
- Asset->/base.css ->paste below code at the bottom of the file.
#shopify-section-template--19314387353868__image_with_text_bkDRDj .image-with-text {
margin: 0px auto;
}
Hello @liambeauchamp
You can add code by following these steps
-
Go to Online Store → Theme → Edit code.
-
Open your theme.liquid file
-
Paste the below code before on theme.liquid
#shopify-section-template--19314387353868__image_with_text_bkDRDj .image-with-text {
margin: 0 auto !important;
}
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.
Thank you - that worked perfectly!
As you can see, the ‘Text with Image’ element isn’t aligned with the ‘Rich Text’ element above, so is there a way to align everything so that it is the same width?
Thank you - that worked perfectly!
As you may have seen though, the ‘Text with Image’ element now isn’t aligned with the ‘Rich Text’ element above. Is there a way to align everything so that it is the same width and all centered?
hI @liambeauchamp
Do you mean like this?
If it is 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:
.image-with-text.image-with-text--no-overlap.isolate.collapse-borders.collapse-corners {
width: 70%;
}
#shopify-section-template--19314387353868__image_with_text_bkDRDj .image-with-text {
max-width: 100% !important;
}
And Save.
Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!
That is exactly what I needed - thank you so much for the solution, I really appreciate it 
Welcome, please dont forget to hit like. Thanks!
You can add code by following these steps
-
Go to Online Store → Theme → Edit code.
-
Open your theme.liquid file
-
Paste the below code before on theme.liquid
@media screen and (min-width: 990px){
.image-with-text__content {
padding: 0 0 0 3.5rem !important;
}
}
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.