I have 3 elements in HTML
as follows:
.navigation {
display: inline-block;
width: 25%;
}
.content {
display: inline-block;
width: 50%;
}
.sidebar {
display: inline-block;
width: 25%;
}
<nav class="navigation">Navigation</nav>
<section class="content">Section</section>
<aside class="sidebar">Aside</aside>
This should fit in the 100% width of the container (<body>
or any other <div>
). However the .sidebar
is being dropped to the next line. I tried to setup border, margin and padding to 0 with the !important
definition (just to test) but the result is the same. How can I fit this 3 elements in the same line keeping the width
property?
Thanks in advance for your answers.