3
I need to put a fixed div at the top of the screen (until then, just use the position: fixed
), but not superimposed by other Ivs and images. It has to be on top of everything.
"Organizing":
<html>
<head>
[brain]
</head>
<body>
<div class="a div que precisa estar no topo, fixa e por cima de tudo"></div>
[resto do site, que quando há scroll, sobrepõe a div acima]
</body>
</html>
CSS:
.beta-info {
background: #fff;
padding: 10px;
text-align: center;
border-bottom: 1px solid #FF016D;
position: fixed;
}
<div id="site">
<div class="beta-info">O SITE ESTÁ EM FASE BETA, BUGS SÃO COMUNS!</div>
[resto do site, sobrepõe a div acima]
</div>
That’s right, but it would be nice to include an example. And I recommend using a high value for the
z-index
, because other elements without explicit z-index have az-index
implicit.– bfavaretto
I was going to post an example but besides being something very simple is very unpleasant codar on the mobile inside the train rs.
– Danylo Santoro
Include the example later then, because I’m sure there will be people wanting to have your answer deleted because it’s too short/too simple. And good riddance! :)
– bfavaretto
ôxente, Danylo, you’re on the train, you signed up at [pt.so], you responded and you’ve already earned 15 points, ¡Olé!
– brasofilo
I did it, thank you. The result is on this link: http://centerload.partica.com/
– Daniel Bonifácio