<div id="parent">
<div id="child"></div>
</div>
#parent {
height: 200px;
width: 500px;
background-color: #ccc;
}
#child {
width: 25%;
height: 30%;
background-color: #ff2222
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.