Shopify themes, liquid, logos, and UX
I need to make the header menu items to be placed to the edge of the website, I'll attach the reference image
Solved! Go to the solution
This is an accepted solution.
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. In theme.liquid, paste the below code before </head>
<style>
mobile-center.page-width.header--has-menu.header--has-account {
padding-left: 0rem !important;
padding-right: 0rem !important;
}
.header {
padding: 0px 0rem 0px 0rem !important;
}
html.js {
overflow-x: hidden !important;
}
</style>
Hey @Sivadarshan ,
To align the header menu items to the edges of your website, you can use CSS. Here’s a code snippet to achieve that:
/* Header Styling */
.header {
display: flex;
justify-content: space-between; /* Aligns items to both edges */
padding: 0 10px; /* Adjust the padding as needed */
background-color: black;
}
/* Menu Items on the Left */
.menu-left {
display: flex;
gap: 20px; /* Adjust space between items */
}
/* Right Side (Shopping Bag) */
.menu-right {
display: flex;
align-items: center;
color: white;
}
/* Links Styling */
.menu-left a, .menu-right {
text-decoration: none;
color: white;
font-size: 16px;
}
.menu-left a:hover {
text-decoration: underline; /* Optional hover effect */
}
This code will ensure the menu items on the left and the shopping bag on the right are aligned neatly at the edges of your website. You can adjust the padding and gap to fit your design needs.
If I was able to help you, please don't forget to Like and mark it as the Solution!
Best Regards,
Rajat Sharma
where to place this code
thanks in advance
CSS code should be added to your theme's CSS file.
Locate the CSS file:
1. Open the Assets folder on the left sidebar.
Look for CSS file like this:
-theme.css
-theme.scss.liquid
- base.css (if you are using a newer theme, like Dawn or Sense)
thanks
but it's not working
Hi @Sivadarshan , kindly provide your store URL please and if it is password protected, please share the password as well. Thanks
This is an accepted solution.
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. In theme.liquid, paste the below code before </head>
<style>
mobile-center.page-width.header--has-menu.header--has-account {
padding-left: 0rem !important;
padding-right: 0rem !important;
}
.header {
padding: 0px 0rem 0px 0rem !important;
}
html.js {
overflow-x: hidden !important;
}
</style>
If my reply is helpful, kindly click like and mark it as an accepted solution.
If you are happy with my help, you can help me buy a COFFEE
Thanks!
After reviewing your store, my suggestion is to install Big Bulk Discount to boost your average order value. Our app adds tiered discounts, encouraging larger purchases and driving more revenue with minimal effort. Start increasing sales today! https://apps.shopify.com/big-bulk-discount
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025