Saturday, September 23, 2023
HomeCSShtml - Just how can I place a component in addition to...

html – Just how can I place a component in addition to one more while keeping paper circulation?


I have an instance where I’m piling a black div in addition to a red div making use of setting outright. After that extra material adheres to.

 p {
setting: loved one;
z-index; 10
}

. wrapper {
setting: loved one;
}

#red {
elevation: 300px;
size: 300px;
background-color: red;
setting: outright;
z-index: 0;
}

#black {
elevation: 200px;
size: 200px;
background-color: black;
setting: loved one;
z-index: 4;
} 
<< div course=" wrapper">
<> < p>> Hi<.
<< div id=" red"><>  < div id=" black"><>  < p>> Globe<.
<

Just how can I make it so Globe shows up listed below the red div in circulation with the remainder of the DOM while keeping the piled divs as they are.

Preferred end result:
enter image description here
The service should utilize the routine DOM circulation to attain this. I.e. establishing Globe to setting: outright and also by hand positioning it in the appropriate location is not what I desire. Likewise ideally no JS made use of.

The core of this problem is that I do not recognize exactly how to pile aspects without making use of setting: outright which takes the aspects outside the DOM circulation. Yet maybe there is a far better means to pile aspects.

RELATED ARTICLES

Most Popular

Recent Comments