<!doctype html>
<head>
<style>
* { -webkit-box-sizing: border-box; }
</style>
</head>
<body>
<div id="test" style="position:relative; width:100px;height:100px; border:5px solid black; background-color:red">
    <div style="display:inline-block">
        <div>
            <div style="position:absolute;left:0;top:0;width:100%; height:100%;background-color:lime"></div>
        </div>
    </div>
</div>
</body>

