how Parent div prevents the div child from expansion outside?
Like div p content div c.
I won’t prevent div c outside div p.
// html file
<div id="p" style="">
<div id="c">
</div>
</div>
// css file
#p {
border: 3px solid #FC3;
border-radius: 20px;
}
#c {
background-color: #0F3;
position:absolute;
}
You can use overflow:hidden:
<div id="c" style="overflow:hidden;"/>