I have a div centered on screen (using width:75%;height:50%;margin: 0 auto;) When I init the map div with OL , it auto aligned to the left. How can I keep having the div in the center of the window?
Your div containing map must be positioned absolutely. If you know the required height and width of your map, it could be as follows:
Full source... Div on center