Center Openstreetmap in div with Openlayers

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Center Openstreetmap in div with Openlayers


I integrated a Openstreetmap to a website - here you can see it Link testpage
On this site you can see the problem.
In the first tab everything is working fine, but in the two following tabs the map moves to the left and isn´t centered anymore.
This is caused by a width of 100% - giving the div a fix width everything works fine (Here a link to the productive site: Link online site)

The question now is, how to get the map centered in a div, which is 100% wide, as I want to get the whole site responsive - including the map.

A good reference is this one here - Link - can I realize that within a div?

Do you have an idea how this could work?
Please ask me, if anything isn´t clear!

Thank you very very much for your help!