I have a page and login to develop and there is a logo right in the center of the page. Ok, I centralized it as follows:
bg{
background-image: url("../imagens/bg.jpg");
background-repeat: no-repeat;
background-position: center;
width: 100%;
height: 1138px;
}
.logo {
background-image: url("../imagens/logo.png");
width: 140px;
height: 101px;
margin-left: -70px;
left: 50%;
position: absolute;
}
I put a position:absolute
and I would like to know if there is another way, otherwise, everything that comes below that% div will have to put position and I do not want it.
HTML:
<div class="bg">
<div class="logo"></div>
</div>
Demo Image: