I am encountering an issue with the header styling in a specific section of my Shopify website. The header is not displaying correctly as intended. Below is the code snippet I have implemented for the header along with its styling:
Liquid Code:
<header class="header header--middle-left header--mobile-center page-width header--has-menu">
<nav class="header__inline-menu">
<div class="links-container">
<ul class="list-menu list-menu--inline" role="list">
<li>
<a id="HeaderMenu-home" href="/" class="header__menu-item list-menu__item link link--text focus-inset" aria-current="page">
<span class="header__active-menu-item">Home</span>
</a>
</li>
<li>
<a id="HeaderMenu-catalog" href="/collections/all" class="header__menu-item list-menu__item link link--text focus-inset">
<span>Lookbook</span>
</a>
</li>
<li>
<a id="HeaderMenu-contact" href="/pages/contact" class="header__menu-item list-menu__item link link--text focus-inset">
<span>Necklace Stacking</span>
</a>
</li>
</ul>
</div>
</nav>
</header>
CSS Code:
.links-container {
position: absolute;
width: 343px;
height: 24px;
top: 50px;
left: 75px;
display: flex;
gap: 16px;
opacity: 1;
background: none;
z-index: 10;
align-items: center;
}
.links-container a {
text-decoration: none;
color: inherit;
}
.header__inline-menu {
position: absolute;
width: 343px;
height: 24px;
top: 50px;
left: 75px;
display: flex;
gap: 16px;
opacity: 1;
background: none;
z-index: 10;
align-items: center;
}
.list-menu--inline {
display: flex;
align-items: center;
gap: 16px;
}
.list-menu--inline li {
list-style: none;
}
Current Issue:
The header is misaligned and not styled properly on the webpage. Here is the current appearance:
Desired Look:
Steps Taken:
- I have reviewed the positioning and alignment properties but have yet to achieve the desired result.
Query:
What modifications can be made to the CSS or Liquid code to attain the preferred styling for the header? Any guidance or recommendations would be highly appreciated.