If the percentage does not work, it means that it simply means that the parent element has no height. In this case, you would like to give both html, and bodyheight.
html, body { height: 100%; }
Setting to bodyjust will not work, since its height in turn depends on html.
. .