[CSS]Position: absolute; with default value

Position an element without set the top/left/bottom/right Summary: elements with position: absolute; will still display even if they don't set top/left/bottom/right. But it seems you have to set the top/left/bottom/right for background images.

by Wenjie Hu

HTML

<div class="wrapper">
    <div class="content"></div>
</div>

CSS

.wrapper {
    position: relative;
    margin-top: 100px;
    margin-left: 100px;
    background: #ccc;
    height: 200px;
}
.content {
    position: absolute;
    width: 200px;
    height: 150px;
    background: blue;
}