Ryan O'Hara Ryan O'Hara - 4 months ago 7
HTML Question

Make <body> fill entire screen?

I'm using a radial gradient as the background on my webpage, like so:

background-image: -webkit-gradient(radial, 100% 100%, 10, 90% 90%, 600, from(#ccc), to(#000));


It works, but when the content does not fill the whole page the gradient is cut off. How can I make the
<body>
element fill the entire page, always?

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