.header {
display: flex
}
.logo,
.contribute,
.class 1,
.class 2 {
display: inline-block;
margin: auto 0;
}
<header class="header">
<div class="logo">
</div>
<nav </nav>
<div class="contribute">
</div>
<div class="class 1">
</div>
<div class="class 2">
</div>
</header>
In this suppose .header
has display: flex;
set.
.logo
, .contributor
, .class 1
, .class 2
has display: inline-block;
set and are child to parent .header
class, which is flex.
How can we make sure that the .class 1
and .class 2
are right aligned without using the flow property?