How to do "position: fixed;" at the top and stand on top of everything?

3

I'm needing a fixed div at the top of the screen (until then, just use position: fixed ), but not overlapped by other divs and images. She has to stay on top of everything.

"Organization":

<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>
    
asked by anonymous 21.10.2015 / 00:02

1 answer

5

Place a z-index on it, larger than any element that has z-index.

    
21.10.2015 / 00:08