[OpenLayers-Users] DOCTYPE / XHTML and fullScreen Mode

Christopher Schmidt crschmidt at metacarta.com
Wed Jan 23 14:20:41 EST 2008


On Wed, Jan 23, 2008 at 01:27:15PM -0500, Jeff Yutzler wrote:
> Hello.
> For a project I am working on, I was told to put the following block at 
> the top of the HTML file:
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> 
> I don't really know what this thing does, but it breaks the concept of:
> style=" height: 100%;"
> that is required to make OpenLayers maps full screen.  To test this, 
> just insert the block into examples/fullScreen.html.  The page does not 
> behave properly in either Firefox 2 or IE7.
> Can anyone explain what is going on here, or better yet, what to do 
> about it?

"Learn XHTML, or don't use it"? :)

The key thing to ask with CSS is "100% of *what*?" In HTML, *insert
vague handwaving*, the body has a height that matches the Window height
by default or something like that. In XHTML, it doesn't. So, your 'body'
div is flat, and 100% of '0' is... 0!

html, body { height: 100%; }

Should get you to a more familiar state.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list