Looking to create a hamburger icon menu using only CSS? Check out my implementation below which includes three span tags in the HTML document.
.sidebar-toggle {
display: inline-block;
}
.sidebar-toggle span {
display: block;
width: 1.5rem;
height: 0.2rem;
border-radius: 0.3rem;
background-color: rgb(196, 196, 196);
margin-top: 0.2rem;
}
<div class="container">
<div class="sidebar-toggle">
<span></span>
<span></span>
<span></span>
</div>
</div>
The browser (Chrome and IE) may display the three bars (span tags) with different heights and margins as shown in the picture below.
Adjusting the height and margin values may fix this issue. It's possible that the browser resolution could be causing the problem.
If you're still facing issues, consider revisiting the CSS for the hamburger icon implementation. Any potential flaws might need to be addressed for optimal display.