How to set the height of a div to 100%?

Hi

How to set the height of a div to 100%?

I set width to 50%

index.html


<!DOCTYPE html>
<html>
    <head>
        <title>Home</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link type="text/css" rel="stylesheet" href="stylesheet.css"/>
    </head>
    <body>
        <div id="workSpace"></div>
    </body>
</html>

stylesheet.css


#workSpace {
    border: 2px solid #3399FF;
    margin: auto;
    height: 100%;
    width: 50%;
    border-radius: 10px;
    background-color: #FFFFFF;
}

body {
    background-color: #F5FFFF;
}

Thank you!

Add this…

html, body{
     height:100%;
     width:100%;
     margin:0;
     padding:0;
}  

… to the top of your style sheet…

Hope this helps.

#workspace div min-height 100% too instead of height. I assume you want a 100% page height? If so this is how http://www.websitecodetutorials.com/code/css/css3-sticky-footer.php

Thank you very much, guys!