I display an openlayers map in a html page by placing it in a tag and assigning a css class to it so as to set its dimensions (map size and map bounds).
i then attempt to dynamically create a style element (my custom division class), append it to the document and change the map class to this custom style.
2 unintended things happen:
just appending the style to the document changes the class of the map division (bad DOM on my part, surely);
the map division still uses "old" bounds (does not center correctly on zoom);
Can anyone recommend a better approach to this situation?
Code and further details on this stackoverflow post