Well, I have the following code:
body {
background-image: url("imagens/fundo.png");
background-repeat: no-repeat;
background-size: cover;
margin: 0;
}
.container {
margin-left: 10%;
margin-right: 10%;
width: 80%;
position: relative;
}
.logo {
position: absolute;
margin-top: 5%;
}
.bloco2 {
position: absolute;
background-color: #ABABAB;
height: 2%;
width: 2%;
margin-top: 20%;
}
.linha1 {
margin-left: 20%;
background-color: #ABABAB;
height: 5%;
width: 20%;
margin-top: 2%;
position: absolute;
}
.online {
margin-left: 60%;
margin-top: 0%;
position: absolute;
}
.jack {
background-color: #ABABAB;
height: 5%;
max-width: 20%;
margin-left: 80%;
position: absolute;
}
.loginsteam {
margin-left: 40%;
position: absolute;
}
.menu {
margin-top: 10%;
position: absolute;
}
.goncalo {
background-color: green;
width: 10%;
height: 5%;
position: absolute;
}
<header>
<div class="container">
<div class="jack">
Best Jackpot: Goncalo
</div>
<div class="online">
<span style="color:#a9a9a9; font-family:proxima_nova_cn_rgregular,sans-serif; font-size:18px; text-transform: uppercase;">Online:</span>
<span style="color:#a9a9a9; font-family:proxima_nova_cn_rgregular,sans-serif; font-size:17px; text-transform: uppercase;"><b>20</b></span>
</div>
<div class="goncalo">
Goncalo
</div>
<div class="logo">
<img src="imagens/logo.png">
</div>
<div class="menu">
Oi
</div>
</div>
</header>
In the style of class .goncalo
, background-color
is not appearing when I enter position absolute
. Because? How can I resolve this?