I have managed to "re-create" what you are referring to.

Firstly, can I just point out, that having scrollbars for your content
isn't a bad thing, considering your example is quite extreme, and no-
one would be browsing the web with a viewport so small.

Onto the issue:
If you strip the padding/margin from the elements inside your content
DIV, then set overflow:hidden, it will indeed work

* { margin:0; padding:0; }
#content { width:200px; height:150px; overflow:hidden; }

Please note, in my example above, I'm removing margin/padding from
every element in the document, however it correctly "cuts" off the
content should it be larger than the 200x150 bounding DIV.

Hope this lends you some insight

Cheers

On Feb 9, 10:03 am, babbos <[email protected]> wrote:
> Hello Pete,
>
> Thankyou for the reply!
>
> The main DIVs i use in all my infowindows have specific widths /
> heights that work if displayed out of an infowindow.
>
> Setting the main div's overflow property to hidden has no effect on
> what i am describing.
>
> In the example you referred to, try resizing your browser to a rather
> small total height, then open the infowindow.
>
> It will have a vertical scroll bar. This does not happen on
> maps.google.com.
>
> ... any ideas?
>
> On Feb 8, 11:27 pm, pete <[email protected]> wrote:
>
> > Hi there,
>
> > If you do not define a width/height to the DIV containing your HTML,
> > then the infoWindow will indeed "grow" to compensate
>
> > Look at this 
> > exmaple:http://code.google.com/apis/maps/documentation/v3/examples/infowindow...
>
> > If you copy that source, re-create it locally and add more HTML to the
> > infoWindow, it expands, as <div id="content"> in the string, doesn't
> > have an associated width/height.
>
> > In terms of avoiding scrollbars, you could do this using the css
> > property "overflow:hidden", on the DIV holding your content, however
> > this is not ideal as it will cut off your content if it were longer
> > then your pre-defined width/height.
>
> > If you have any live examples, please share and I can have a further
> > look
>
> > Cheers
> > Pete
>
> > On Feb 8, 10:50 pm, babbos <[email protected]> wrote:
>
> > > Hello,
>
> > > I am trying to make an application using google maps api v3.
>
> > > I have noticed that when i open an infowindow, the infowindow pans to
> > > it's maximum possible dimension it can contain given it's contents.
>
> > > If the contents of the infowindow are larger than the available in-map
> > > area for the infowindow, then the infowindow will have scroll bars,
> > > vertical and or horizontal.
>
> > > From what i have understood so far, there is no way to control this
> > > behaviour.
>
> > > The behaviour that would be ideal is how the maps.google.com 's
> > > infowindows open, disregarding available height they will take up as
> > > much size as their content needs, no scroll bars.
>
> > > How can i achieve this?
>
> > > Thankyou
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to