After using the z-index attribute, the child element is out of the document stream, but do you still want the width to be 100% full of the parent element (no matter how the parent element is scaled)?

I want to take the child element out of the document stream with the z-index attribute, but the width still changes with the parent element. Is there a way to do that?

Css
Oct.12,2021

z-index cannot be separated from the document stream, so left:0,right:0 can be covered with non-static-positioned parent elements


Why not just set the absolute positioning of the

child elements?

.parent{
    position:relative;
}
.child{
    position:absolute;
    width:100%
}
<div class="parent">
    <div class="child"></div>
</div>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eafc95-2282.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eafc95-2282.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?