I'm currently working on a project involving CSS/HTML and using Bootstrap 4 for my layout. I have a menu where I want the boxes to be the same size as the font-size, so I've set the margin and padding to 0.
.menu-ppal {
display: inline;
line-height: 16px;
box-sizing: content-box;
}
.menu-ppal li {
display: block;
padding: 0 10px 0 0;
box-sizing: content-box;
}
.menu-ppal-text a {
display: inline;
text-decoration: none;
margin: 0;
padding: 0;
font-family: 'Oxygen', sans-serif;
font-size: 16px;
font-weight: 700;
background: #d6dbdf;
color: #111a21;
text-align: center;
text-transform: uppercase;
}
<nav class="menu-ppal">
<ul class="nav flex-column flex-md-row ">
<li class="nav-item menu-ppal-text">
<a class="nav-link" href="#">Actus</a>
</li>
</ul>
</nav>
Despite setting the font-size at 16px and ensuring both margin and padding are 0 according to the developer tools, the actual model box dimensions turn out to be 50.4333×21. This issue persists in various locations within my project...