-3
Good afternoon, folks, how are you?
I’m looking for a way to overlay div’s position without Absolute and relative, would like?
if I use any of these, it ends up leaking into my header (which is with the position Fixed) when scrolling the page.
Any suggestions?
I need element2 to override element 1 and 3, stay in the middle of both, but overlap.
ex: html : `
</head>
<body>
<header class='header'> </header>
<div class="elemento1">a </div>
<div class="elemento2">b </div>
<div class="elemento3">c </div>
</body>``
CSS: .header{ position: fixed; }
There is little information in the question to give a good answer, but if I understand correctly you can use
transform: translate
and its variations.– Rafael Tavares
this overlaps also, Rafael, but ends up having the same effect of position Absolute and relative, it overwrites the header also when scrolling the screen.
– Gabriel Claudino Marinho
You can use position Absolute and use z-index in the header.
– Sam
it worked, thank you very much, sam!
– Gabriel Claudino Marinho