[OpenLayers-Users] map with position:absolute not displayed in ie <= 7

christopher.schmidt at Nokia.com christopher.schmidt at Nokia.com
Mon Jul 26 17:46:22 EDT 2010


On Jul 26, 2010, at 5:35 PM, ext arno wrote:

> Hi,
> I want to have displayed on the whole page except a 2em height footer.
> 
> So, I've tried to set my css to :
> 
> #map {
>    position: absolute;
>    top: 0; left: 0; right: 0;
>    bottom: 2em;
> }
> 
> It works fine in every browser I tested except in ie6 and ie7.
> For those browsers, I absolutely need to set a width and height css 
> properties. For example: width: 100% and height: 100%, otherwise the map does 
> not show at all: it stays a white area. But as height: 100% - 2em does not 
> exist, I can't have the behaviour I want.
> 
> What's strange is that a "normal" div (not an ol map) is correctly displayed 
> with { position: absolute; top: 0; left: 0; right: 0; bottom: 2em; } in ie.
> 
> What's strange also is that map images are downloaded from the tile server.
> 
> Here is an example of a map showing correctly except in ie6 and ie7:
> 
> http://renevier.net/bugs/ol_absolute.html
> 
> Do you have any clue of why this problem happens, and/or any workaround ?
> 
> regards
> arno
> <signature.asc><ATT00001..txt>

Unfortunately, I don't have any advice for you (I'm not currently set up to
debug IE), but I did want to thank you for such a concise and well-written
explanation, with simplified example, of the problem you're having. This is
an excellent example of exactly how to ask a good question.

I do feel kind of bad I can't provide a good answer in response :)

-- Chris


More information about the Users mailing list