[OpenLayers-Users] Scrollbars in popup windows

Jana Golinowski jgolinowski at codematix.de
Wed Dec 19 04:49:50 EST 2007


Hello Nick,

> I'm trying to add scrollbars to photo popups on Freemap, 
> http://www.free-map.org.uk/. They work if I set to overflow property of the 
> contentDiv's style to 'auto', however the scrollbar is on the extreme right 
> of the popup and rather hard to see. I tried doing stuff like setting the 
> margin of the popup but that didn't work. Is there anything I can do to sort 
> this?

the problem I see is the your content-div's size.
The parent-div (div.olPopup) has width:320px. The calculated width of the content-div (div.olPopupContent) isn't 320px but 320px(content-width)+5px(padding-left)+5px(padding-right) = 330px.
So if you change the style of .olPopupContent from "padding: 5px;" to "padding: 5px 0px;" the scrollbar will be placed right.

Greetings,
Jana.



More information about the Users mailing list