Почему третьи aside не помещается в правый ряд?
Проблема заключается в том что первый side-bar - занимает 20% ширины , div с основной информацией 80% , а второй side-bar занимая 20% ширины не влезает в правую сторону .
* {
box-sizing: border-box;
}
.main-info {
width: 80%;
text-align: justify;
}
.main_p {
font-weight: bold;
}
.main-info h2 {
font-weight: bold;
font-size: 45px;
}
.main-info p {
font-size: 35px;
}
.side-bar {
float: left;
width: 20%;
padding-bottom: 20%;
}
.side-bar h2 {
font-weight: bold;
font-size: 35px;
}
.side-bar-li {
font-size: 30px;
}
.size-bar-2 {
float: left;
width: 20%;
}
.side-bar-2 h2 {
font-weight: bold;
font-size: 35px;
}
.side-bar-2 p {
font-size: 30px;
}
<aside class="side-bar">
<h2>Боковая панель 1</h2>
<ul>
<li class="side-bar-li">Some news about it</li>
<li class="side-bar-li">Some words just for delete it</li>
<li class="side-bar-li">Some skywars , but bedwars is poop</li>
<li class="side-bar-li">Some anime, and Minato is the best character in whole Naruto</li>
</ul>
</aside>
</div>
<div class="main-info">
<h2>Название</h2>
<p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here,
content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various
versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
</p>
</div>
<aside class="side-bar-2">
<h2>Боковая панель 2</h2>
<p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable.</p>
<h2>Второстепенная панель</h2>
<p>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested.</p>
<h2>Второстепенная панель</h2>
<p>It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p>
</aside>
Ответы (1 шт):
Автор решения: Fox
→ Ссылка
80% + 20% + 20% = 120%. Ваши блоки не могут занимать 120% из 100%.
Замените значение widht: 80% на 60%:
.main-info{
width: 80%;
text-align: justify;
}
В таком случаи два блока меню будут занимать 40% (20% + 20%) и сам контент будет шириной 60%.