Hi, i use theme premium (wwarehouse) wanting to central my logo for mobile phone as it is currently to the side
Topic summary
A user seeks help centering their logo on mobile view for the Warehouse Premium theme. The logo currently appears aligned to the left side.
Solutions Provided:
-
Moeed suggested adding CSS code to
theme.liquidabove the</body>tag using media queries to adjust header spacing, though this didn’t fully center the logo. -
Zachary1 recommended adding CSS to
theme.csswithmargin-left: 2em !importanton.header__logo, providing a visual example. The user reported implementation issues and couldn’t publish changes. -
britimein1 offered comprehensive CSS targeting multiple selectors (
.site-header__logo,.header__logo, etc.) using flexbox properties and auto margins for mobile screens under 749px.
Current Status:
The issue remains unresolved. The user encountered difficulties implementing the suggested code and requested additional guidance on checking for existing <style> tags in their theme files. No confirmation of a working solution has been posted.
It actually looks great where it’s at.
here is the link
Hey @pnsempire
Follow these Steps:
- Go to Online Store
- Edit Code
- Find theme.liquid file
- Add the following code in the bottom of the file above </ body> tag
<style>
@media screen and (max-width: 767px) {
.header__inner {
justify-content: space-between !important;
}
.header__action-list {
margin-left: 0 !important;
}
}
</style>
RESULT:
If I managed to help you then a Like would be truly appreciated.
Best,
Moeed
Hey thanks for the reply, that still isnt fully in the middle, how can i get it fully in the middle
Hello @pnsempire
Please kindly try this code I attach below by adding in theme.css file and see if it works on your store mobile port. If it works, it should look like the image I share here:
<style>
.header__logo {
margin-left: 2em !important;
}
</style>
Hey, tried however it doesnt work
tried on the header, doesnt seem to work i cant even publish it. can you please advise
May I know if your theme contains related codes already? If so, you can add below code inside related code patterns directly, and it will work as well.
.header__logo {
margin-left: 2em !important;
}
how do i check that?
You can check by searching with in theme.css to see if it exists already. If so, you can add my shared codes inside and content, so that the code will work correctly.
Use this css
/* Center logo on mobile (Warehouse Premium ww ar ehouse) / @media (max-width: 749px) { / Center the logo image inside its container */ .site-header__logo, .header__logo, .logo, .site-header__logo-img { display: block; margin-left: auto; margin-right: auto; float: none; text-align: center; }
/* If the header uses a flex container, center items in the header row */ .site-header__wrap, .header__inner, .header__bar { display: flex; justify-content: center; align-items: center; }
/* Optional: ensure nav/menu doesn’t push logo off-center */ .site-header__right, .header__icons, .header__menu { justify-content: center; } }


