[OpenLayers-Users] width+height 100% in standards-compliant mode

Andreas Hocevar andreas.hocevar at gmail.com
Wed Jun 4 05:46:20 EDT 2008


Hi,

I need some advice on how to style an OpenLayers map that should have
a 1-pixel border and fill 100% of the view port. This is no problem in
quirks mode, but in standards compliant mode it won't work in IE. This
is the CSS I have now:

            html, body {
                width: 100%;
                height: 100%;
                overflow: hidden;
                margin: 0px;
            }
            #map {
                border: 1px solid black;
                position: absolute;
                bottom: 0px;
                top: 0px;
                left: 0px;
                right: 0px;
            }

In IE (6+7), I see the borders, but no map. If I add "height:100%" to
#map, I see the map (with all borders in IE6+7, without bottom border
in FF), but when opening a popup in IE 7, the map disappears. It works
fine in quirks mode, but I need standards compliant mode for this
application.

Any help would be highly appreciated.

Thanks
Andreas.



More information about the Users mailing list