I’v searched the SO but none is same question.
<div class=‘container’>
<aside class="aside-left">
menu1
menu2
</aside>
<div class="content">
pagesssssssssssss
</div>
<footer>
copyright
</footer>
</div>
.container {
display: flex;
justify-content: center;
}
.aside-left {
width: 200px;
}
requirements:
- the content div always center in window, ignore the aside div
- when window width < 991px, aside display none;
- better use the flex not the float solution
first-item-on-center-and-second-item-at-last-in-flex is relative but the aside tag still influenced the content div
2
Answers
Not sure if I understood but try this:
is that what u mean?
i mean if u want just a one child to be centered u put
justify-self: center;
on him