Upon reviewing the image, it's apparent that a user navigation menu with icons has been successfully created.
An observant eye may have noticed a small undesirable margin between these elements.
The CSS responsible for producing the box is as follows:
background-color: hsla(0, 0%, 30%, 0.30);
border-radius: 5px;
height: 45px;
Each individual icon possesses its unique CSS class.
.userIcon,
.loginIcon,
.logoutIcon,
.registerIcon,
.settingsIcon
{
border-right: 1px solid hsl(0, 0%, 30%);
display: inline-block;
height: 45px;
width: 45px;
}
.userIcon
{
background: url(user.svg) no-repeat center;
background-size: 30px;
}
.loginIcon
{
background: url(login.svg) no-repeat center;
background-size: 30px;
}
/* ... other icons ... */
The HTML markup of the box is structured as shown below:
<div class="usermenu">
<a href="/user" class="userIcon"></a>
<a href="/settings" class="settingsIcon"></a>
<a href="/login" class="loginIcon"></a>
</div>
Despite diligent inspection, the origin of this mysterious margin eludes me along with the solution to fix it. Any insights?