-1
My home site has a start html:
<header class="headd">
<div id="divcentral">
<a href="index.html" id="linklogocentral"><img src="img/logo.png" id="logocentral"></a>
<h1 id="titulo">Lukas Monteiro</h1>
<h2 id="subtitulo">Bem vindo</h2>
<a href="#meuMenu" id="linksetabaixo" class="scroll"><img src="botao/setabaixo.png" id="setabaixo"></a>
</div>
</header>
and in css I put:
header {
width: 100%;
height: 100%;
background-image: url(../img/backgroundheader1.png);
background-repeat: no-repeat;
background-size: cover;
background-position: center;
}
#divcentral {
width: 407px;
height: 500px;
margin: auto;
padding-top: 200px;
text-align: center;
}
so that the initial part of the site occupies 100% on any screen size. However, when I expand the screen(increase the screen I am) to div central rises a little, misaligning what is to be in the middle.
How do I leave the div exactly in the middle on any screen size? I still can’t do it. When I make a website on my laptop, and open it on a computer EVERYTHING is out of place (usually in height) since on the sides I always center or put margin left on %.
without wanting to abuse their goodwill, could explain me what the flex display & the Justify-content do?
– Lukas Monteiro
ah, and thank you. !
– Lukas Monteiro
This might help you, https://developer.mozilla.org/en-US/docs/CSS/Usando_caixas_flexiveis_css
– Léo Cunha
@Lukasmoiro that good, man! Good luck there in your project. Consider to vote positive and mark the question if this has solved your problem.
– Wallace Maxters