Shopify themes, liquid, logos, and UX
Hi, can someone help me to center the headers of these featured collections on the homepage for the detskop and mobile version? Thanks
Solved! Go to the solution
This is an accepted solution.
Hello @atm19 ,
Please add the below mentioned code at the bottom of the theme.liquid file before </body> tag and save for the desired output in mobile version.
<style>
@media screen and (max-width: 720px){
h2.title.inline-richtext.h2.scroll-trigger.animate--slide-in {
text-align: center;
}
}
</style>
Output -:
I hope this helps.
Please share if you have any query.
Thank you.
Hello @atm19
Add this CSS code to your css file
.collection__title h2 {
text-align: center;
}
Let me know if you need any more help.
Thanks! but it works only for detskop version i need it also on mobile.
Try to add important like this
@atm19
I can see the text center css but it is applied on hover
Add the CSS directly at the bottom of your base.css file
If you need help do let me know.
Hi @atm19 Please add the code in your theme.css/base.css/style.css file which is available in your theme.
.collection__title.title-wrapper.title-wrapper--no-top-margin.page-width.title-wrapper--self-padded-tablet-down {
text-align: center !important;
}
If you are not sure where is your theme.css/base.css/index.css/style.css file please follow the steps:
Result:
If you will unable to implement the same then I'm happy to do this for you, let me know. I can implement the code changes so that this will work well for you.
Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!
Best Regards
Sahil
- Your
Thank you, but it works only for detskop i need it also on the mobile version.
Hi @atm19 Please add !important and it will work well.
Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!
Best Regards
Sahil
- Your
on the MOBILE version
Hi @atm19 Try to use this code.
.collection__title.title-wrapper.title-wrapper--no-top-margin.page-width.title-wrapper--self-padded-tablet-down>h2 {
text-align: center !important;
}
Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!
Best Regards
Sahil
- Your
it works thanks. But again not on the mobile version. What should i try other?
This is an accepted solution.
Hello @atm19 ,
Please add the below mentioned code at the bottom of the theme.liquid file before </body> tag and save for the desired output in mobile version.
<style>
@media screen and (max-width: 720px){
h2.title.inline-richtext.h2.scroll-trigger.animate--slide-in {
text-align: center;
}
}
</style>
Output -:
I hope this helps.
Please share if you have any query.
Thank you.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey 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, 2024