HTML and CSS Reference
In-Depth Information
div .corner1 {
top: 0;
left: 0;
}
div .corner2 {
top: 0;
right: 0;
}
div .corner3 {
bottom: 0;
right: 0;
background-color: #999;
}
div .corner4 {
bottom: 0;
left: 0;
background-color: #999;
}
<div>
Here is some content before the four child div elements.
<div class="corner1">1</div>
<div class="corner2">2</div>
<div class="corner3">3</div>
<div class="corner4">4</div>
Here is some content after the four child div elements.
</div>
When content is pulled out of the normal document flow, the height of
the parent element shrinks. It is easy to run into cases where the parent
shrinks too much and the positioned element overflows its parent
container. You can force the space open with height, width, or padding
Search WWH ::




Custom Search