I am facing an issue with adjusting the spacing in my menu list and its elements:
https://i.sstatic.net/nOD8o.png
I want the space to display with a white background and I want the list to occupy all available space.
This is the effect I am aiming for:
Here is the HTML code:
<nav role="navigation" class="nav-menu w-nav-menu" id="primary_nav_wrap">
<ul>
<li>
<a href="index.html" class="nav-link w-nav-link w--current">Home</a>
<ul>
<li><a href="#">About Us</a></li>
</ul>
</li>
<li>
<a href="#" class="nav-link w-nav-link">Services</a>
<ul>
<li><a href="#">Mobile Services</a></li>
<li><a href="#">Window Tinting</a></li>
<li><a href="#">Wrapping</a></li>
</ul>
</li>
<li>
<a href="benefits.html" class="nav-link w-nav-link">Benefits for You</a>
</li>
<li>
<a href="#" class="nav-link w-nav-link">Gallery</a>
<ul>
<li><a href="#">Mobile Repair</a></li>
<li><a href="#">Window Tinting</a></li>
<li><a href="#">Wrapping</a></li>
</ul>
</li>
<li>
<a href="contact.html" class="nav-link w-nav-link">Contact Us</a>
</li>
</ul>
</nav>
The lists under each link are the submenus.
And here is the CSS code being used:
#primary_nav_wrap ul {
list-style: none;
position: relative;
float: left;
margin: 0;
padding: 0
}
#primary_nav_wrap ul a {
display: block;
text-decoration: none;
line-height: 32px;
padding: 0 15px;
}
#primary_nav_wrap ul li {
position: relative;
float: left;
margin: 0;
padding: 0
}
#primary_nav_wrap ul ul {
display: none;
position: absolute;
top: 100%;
left: 0;
background: #fff;
padding: 0
}
#primary_nav_wrap ul ul li {
float: none;
width: 200px;
background: #fff;
}
#primary_nav_wrap ul ul a {
line-height: 120%;
padding: 10px 15px;
color: #000;
}
#primary_nav_wrap ul ul li:hover {
background: #ffed00;
}
#primary_nav_wrap ul ul a:hover {
color: #fff;
}
#primary_nav_wrap ul ul ul {
top: 0;
left: 100%
}
#primary_nav_wrap ul li:hover>ul {
display: block
}
This code specifically pertains to the "nav" tag on my HTML page.
Thank you for your assistance.