I was building a customizing the header in horizon theme , and unfortunately I tired many css options, but nothing has worked. Is there anyone know what exactly the changes needed to achieve the similar header ? With margins left and right, and dividers
The layout you’re trying to achieve is usually a mix of three things inside the header container: a max width wrapper, horizontal padding, and border separators between the menu items or sections.
With Horizon specifically, a lot of the spacing is controlled by flex containers and CSS variables, so adding margin alone often won’t change anything because the parent wrapper is still set to full width.
I’d probably inspect the outer header wrapper first rather than the individual menu items. In many cases the dividers are also being added with pseudo elements instead of actual borders, which is why simple CSS tweaks sometimes don’t respond the way you expect.
Did you modify the header through custom CSS only, or did you also change the theme section structure/liquid?
Welcome to the Shopify Community! Please share your store URL and password (if it’s password-protected), so I can check and provide you with the exact solution.
I tried to Modify it using css inside the header.liquid. earlier i managed to move the icons all the way to the right using the css only. so i thought i could do this header style using css only. but unfortunately, it creates some margins over the header, but the dividers are difficult to manage.
After applying these changes, the header will be properly centered in a boxed layout with balanced left and right spacing, matching a clean structured design. The icons will remain correctly aligned on the right without affecting the layout. The divider will appear clean, stable, and properly positioned, and the full-width stretching issue will also be fixed so the header follows a controlled modern structure instead of an edge-to-edge layout.
If this still does not work on your side, please let me know I will help you troubleshoot it step by step until it is fully fixed.
Please add the following CSS code at the very bottom of your (base.css) file.
This code applies structural flexboxes with an explicit order sequence to force the 3-column layout on mobile/tablet viewports, ensuring the burger menu stays left, the logo is centered, and utility icons align to the right: