<!DOCTYPE html>
<html>
    <body>
        <p>The width of innerdiv should be 50% of the width of the outerdiv.</p>
        <div id="outer" style="height: 300px; width: 400px; background-color: lightcyan;">
            <div id="inner" style="width: 50%; height: 50%; background-color: lightseagreen;"></div>
        </div>    
    </body>
</html>