I want to move my logo to the left and the other items onto the right for my header on mobile (just like this photo of nike)
. I am new to all the codes and have a tried a few but do not work, the theme I am currently using is spotlight.
A user wants to replicate Nike’s mobile header layout in their Shopify store using the Spotlight theme: logo aligned left, other icons aligned right.
Initial attempts:
.header-logo and .header-menu selectors failed because these class names don’t exist in the Spotlight themeResolution:
.header, .header__heading, and .header__heading-link classesgrid-template-areas, grid-template-columns) and justify-self within a mobile media query (max-width: 989px)Key takeaway: Theme-specific class names are crucial for custom CSS modifications. Generic solutions often fail without inspecting the actual theme structure.
I want to move my logo to the left and the other items onto the right for my header on mobile (just like this photo of nike)
. I am new to all the codes and have a tried a few but do not work, the theme I am currently using is spotlight.
Hii @ah01
Can you please share the Store URL?
It is currently password protected.
Can you please let me know the password?
To align your logo to the left and other items to the right on mobile, you can achieve this with custom CSS. Here’s a simple example for the Spotlight theme:
@media (max-width: 768px) {
.header-logo {
float: left;
}
.header-menu {
float: right;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
}
}
Add this code to your theme’s custom CSS section. If it doesn’t work as expected, inspect your theme’s class names and adjust the CSS selectors accordingly.
Just like “infection control experts” use precise methods to address issues, a bit of CSS tweaking should get your header looking perfect! Let me know if you need further help.
This still doesn’t work as it says the header-menu and header-logo aren’t being used in this secion… what other names may it be? or how do i find what name it is. Sorry if these are silly questions I am new to this.
Hii @ah01
Can you try using this CSS and let me know if it works
@media screen and (max-width: 989px) {
.header {
grid-template-areas: “heading left-icon icons” !important;
grid-template-columns: 2fr auto !important;
}
.header__heading, .header__heading-link {
justify-self: start;
}
}
this worked, thank you