how do I “Center “Homepage” and align other links accordingly in the header”
I want to move Homepage center and have everything else follow homepage.
Goal: Center the “Homepage” menu item in the header navigation and have all other links align around it, while preserving existing dropdown functionality.
Context: Using a Shopify theme (references to theme.liquid, header.liquid, base.css/theme.css). The user needs to keep the current navigation output (for dropdowns) rather than hard-coded links.
Attempts/observations:
Open questions:
Artifacts: Two screenshots are central to understanding the misalignment and the current output.
Status: Unresolved; no confirmed solution yet.
how do I “Center “Homepage” and align other links accordingly in the header”
I want to move Homepage center and have everything else follow homepage.
I know you can move them accordingly, I want homepage center but it won’t really center due to other categories lengths.
How would that work with navigation I already setup? Like the navigation I have setup doesn’t output links? I need to keep the dropdown aspect and a link wouldn’t cover that unless its a page?
Also if this code does work with what I have already setup where would I modify this code? theme.liquid, header.liquid?
I pasted it in header.liquid and it outputted this:
I also tried base.css and theme.liquid - no effect?
I’m using in theme.css and base.css. Still nothing.
"
base.css:
"
nav {
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
color: rgba(255, 255, 255, 1); /* White text color */
padding: 10px 0; /* Adjust padding as needed */
}
.nav {
display: flex;
justify-content: center;
list-style: none;
padding: 0;
}
.nav li {
margin: 0 10px; /* Adjust this as needed */
}
.home-link {
font-weight: bold; /* Added bold effect */
text-decoration: none; /* Removed underline effect */
flex-grow: 1; /* Push Homepage link to the center */
}
"