I need to center an element #center-navigation
relative to the page center and then position the two another on the left (#logo
) and right (#contacts
) sides of the element. Currently in my implementation #center-navigation
is not centered on the page. Is it possible to do with flexbox?
#row {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
#logo {
height: 20px;
width: 80px;
background-color: red;
margin-right: auto;
}
#contacts {
margin-left: auto;
}
h1 {
text-align: center;
}
<div id="row">
<div id="logo">
</div>
<div id="center-navigation">
Some navigation here
</div>
<div id="contacts">
example@mail.org
</div>
</div>
<h1>
Some long website title goes here
</h1>