Shopify themes, liquid, logos, and UX
Hello, I had tried to enlarged and center the mobile logo and expand the icons to the sides for more room. This is the current code used under theme settings CSS. but as you can see it's still not centered. can anyone help? ride theme. Thank you.
Domain: lovedandlavished.com
PW: test123
@media screen and (max-width: 768px){ header.header { padding-left: 10px !important; } summary.header__icon.header__icon--search > span { width: fit-content !important; } summary.header__icon.header__icon--search > span > span.svg-wrapper:nth-child(1) { width: unset !important; } summary.header__icon.header__icon--search { width: fit-content !important; } }
Hey @LAL,
I've reviewed your site and the current CSS you're using to center your logo on mobile. I can see why you're having trouble - the current approach needs a few adjustments to properly center the logo and space out the icons.
Here's a CSS solution that will center your logo and give your icons more breathing room:
@media screen and (max-width: 768px) { /* Improve header spacing */ header.header { padding: 10px 15px !important; justify-content: space-between !important; } /* Center the logo */ .header__heading { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; } /* Make logo slightly larger */ .header__heading-logo { max-width: 200px !important; } /* Ensure icons have proper spacing */ .header__icons { margin-left: auto; } /* Adjust hamburger menu position */ summary.header__icon--menu { margin-right: 10px; } }
To implement this:
Let me know if you need any help implementing this or if you'd like any adjustments to the sizing!
Best regards,
Shubham | Untechnickle
Helping for free: hello@untechnickle.com
Don't forget to say thanks, it'll make my day - just send me an email!
Get Revize for Free | Let your shoppers edit orders post-purchase | Get Zero Support Tickets | #1 Order Editing + Upsell App
sorry that did not work well, it made logo smaller and it was not responsive to screen sizes , I had two different views in two phones, one the logo overlapped the search icon. see pics. 😞
<style>
@media screen and (max-width: 767px) {
header.header.header--top-center.header--mobile-center.page-width.drawer-menu.header--has-menu.header--has-account {
display: flex !important;
justify-content: center !important;
}
.header-wrapper.color-scheme-6eb00285-a6b5-4fcf-b72d-98981867c904.gradient {
margin-left: 7px;
}
img.header__heading-logo.motion-reduce {
margin-right: 32px;
}
}
</style>
Go to online store ----> themes ----> go to three Dots ----> edit code ---->find theme.liquid files ----> place the code ---->
before the body ----->
if this code work please do not forget to like and mark it solution
thank you but sadly I didn't get the same results you did, logo was still very small, only diff was just more spaces next to the hambuger.
Hello @LAL
Go to online store ----> themes ----> actions ----> edit code ----> base.css
add this code at the end of the file and save.
@media screen and (max-width: 768px) {
.header {
padding: 0px !important;
}
}
result
If this was helpful, hit the like button and accept the solution.
Thanks
hi it works and looks beautiful but now the screen moves from left to right, right to left and there's a scroll bar at the bottom for side to side movement. 🙁
Hi @LAL
Check this one.
@media screen and (max-width: 768px) {
header.header {
padding-right: 10px !important;
}
.header__icons {
padding-right: 0;
}
}
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
hi this one also works and looks beautiful but the same thing happens, the screen moves from left to right, right to left and there's a scroll bar at the bottom for side to side movement.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025