htmlcssradial-gradients

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?


Solution

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