July 05, 2004

Filling the browser window

Running into problems filling your browser window? Apparently just setting the width and height to 100% doesn't always work, particularly in Mozilla derivative Firefox. Keith Peters explains over at BIT-101 that it's because of how the browser answers the question: "100% of what?"

The swf is in the body tag. The body tag is in the html tag, which is in the browser window. Most browsers will scale the html size to fill the browser window and scale the body to fill the html size. Not so with Mozilla/Firefox. It doesn't assume that html fills 100% of the browswer, or that body fills 100% of the html. So you have to tell it that.

Keith also provides a quick CSS workaround:

body,html { 

margin:0px;

padding:0px;

height:100%;

}

(BTW, if you haven't visited BIT-101, you should, even if you don't develop in Flash.)

Technorati tags: browser | css | html | firefox | mozilla | fill the browser window | margins |

src="http://feeds.feedburner.com/~s/ChaosMagnet?i=http://www.chaosmagnet.com/blog/archives/000455.html" type="text/javascript" charset="utf-8">
Posted by roadnick at July 5, 2004 01:00 PM | TrackBack

Comments

Post a comment









Remember personal info?