I have 2 containers one with position relative
and fixed
I explain that I am trying to give a width
of 100%
to the container that has the position fixed but it leaves the parent container, it needs the 100% of the parent container and having a position fixed .
How can I achieve this?
this is what I tried ....
.padre{
position:relative;
width:300px;
height:300px;
left: 0;
top: 0;
background: rgb(0,0,0,0.5);
z-index: 1500;
align-items: center;
justify-content: center;
}
.hijo{
position:fixed;
width:100%;
height:60px;
left: 0;
bottom: 0;
clear:both;
background: rgb(240,240,240,0.5);
z-index: 1500;
padding:10px;
}
<div class="padre">
<div class="hijo">
bienvenido
</div>
</div>