Goal: Style the last header menu item in Shopify’s Dawn theme as a right-aligned button on desktop, and make it look good or hide on mobile.
Initial issue: The added CSS pushed the logo off-center on smaller screens and the button overlapped elements on mobile. Screenshots illustrated misalignment and overlap.
Guidance provided:
One responder pointed to specific CSS class changes and removing a conflicting style (details shown in images).
Another suggested placing custom CSS in theme.liquid (above ), though the OP initially used base.css.
Outcome (resolved by OP):
Desktop: The last menu item is styled as a button and right-aligned (li:last-child with margin-left:auto; header grid adjustments). Logo alignment fixed.
Mobile: Other menu items are hidden, only the button shows; button text centered; reduced font size and padding via media queries; menu drawer last item hidden to avoid duplication. The OP shared a complete CSS snippet implementing these changes.
Key techniques explained:
CSS media queries (min-width/max-width) to separate desktop/mobile behavior.
Using li:last-child selectors to target the final menu item.
CSS Grid (grid-template-columns/areas) to control header layout.
Status: OP’s issue is solved. A new participant asked where to find the referenced classes and steps in the code editor; no clarification posted yet, so the thread remains open.
Summarized with AI on December 19.
AI used: gpt-5.
I have achieved putting the button on my page with the below code taken from this [Community Post ](http://In%20Dawn Theme, add button to right side of header on desktop, but remove or make look good on mobile https://community.shopify.com/post/2446238).
However, this code is making my logo un-centered when the screen is minimized.
I’m having the same issues as the OP having added the same code to the bottom of my base.css file on dawn theme. I can’t understand these 2 steps though, what class am i looking for and where am i finding it in edit code?