Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How do you extend the background fully from top to bottom?

Here is an example of what I am talking about:

http://www.gfedwrestling.com/login.py?from=%2Fpage...

As you can see the page has no scroll bar, but yet the background extends fully to the top and bottom. Is this done through a background image? Or can you do it with css?

1 Answer

Relevance
  • 1 decade ago
    Favorite Answer

    You can use css to do this. Normally this will work:

    body{

    background-color:#000080;

    background-image:url('bg.jpg');

    background-position:center top;

    background-repeat:repeat-y;

    }

    putting the style on the body element will make sure it uses the whole page's height no matter how much content there is. using "repeat-y" will repeat the image vertically if the image height is less than the body height (you can also use "repeat-x" or "repeat" there as well). if you don't use an image, just specifying the color alone is enough.

Still have questions? Get your answers by asking now.