I need the image to be positioned on the left until the menu activates its "responsibility" (and then it centralizes normally), but I already tried to add it in another field but the menu broke, I tried to center it but it did not work ... I'm starting now with flex box so would appreciate it if you could help me.
.hdgeral {
background: red;
width: 100%;
}
header {
height: 20%;
width: 100%;
}
nav {
display: flex;
justify-content: flex-end;
padding: 2em;
}
ul {
list-style: none;
margin: 0;
padding: 0;
display: flex;
}
a {
position: relative;
display: inline-block;
padding: 1em;
text-decoration: none;
color: #000;
}
@media all and (max-width: 800px) {
ul {
flex-grow: 1;
justify-content: space-around;
}
}
@media all and (max-width: 600px) {
ul {
flex-direction: column;
align-items: center;
width: 100%;
}
}
<header class="hdcentral">
<nav>
<ul>
<li><a href=""><img src="http://placehold.it/350x150"></a></li><li><ahref="#Empresa" target="_self" title="Sobre nossa empresa">Empresa</a></li>
<li><a href="#Servicos" target="_self" title="Serviços fornecidos">Serviços</a></li>
<li><a href="#Mapa" target="_self" title="Nossa locação">Mapa</a></li>
<li><a href="#Contato" target="_self" title="Formulário de contato">Contato</a></li>
</ul>
</nav>
</header>