Home > Web Design > Filling browser with background colour using YUI Grids

Filling browser with background colour using YUI Grids

April 8th, 2009

I am not sure if anyone else has had this problem, but one thing I have never liked about using Yahoo! UI Grids library is that I could never get a background colour applied to <body> to fill the entire background. It would only go to the bottom of the #doc div. So if that happened to be half way up your browser window you were left with half a window of white.

I finally figured out how to solve this. Grids, or Reset, adds a background CSS attribute to the html element. To get rid of this, and have your background fill the entire browser simply use

html {
  background: none;
}
Categories: Web Design Tags:
Comments are closed.