Hello again Pete,

thankyou for your great help!

Scrollbars are useful when you need them, there are times you need
them and times that you don't.


I have tried your solution in many variations and as i expected it
didn't work. There is nothing you can do inside a container that has a
strict style set like the google map's infowindow.  padding / margin
has to do with the 'volume' of the element, the desired behaviour is
indeed the overflow attribute but not the conten't but the div that
contains the content and forms the whole infowindow.

This is a rather annoying issue, i was counting pixels and came to the
conclusion that you can do so much...

maps.google.com infowindow height is around 300px for a normal content
result.

The content i want to display is around 200px.
Add to that 70pixels that is the height of the point that points from
the balloon to your marker and you have a total of 270px.

270pixels of total free height space before you infowindow displays
vertical scrollbars.

The map header is around 30 pixels, so the whole of the map should be
of a height of AT LEAST 300px.

Add to that your navigation and general site layout you come with a
minimum height requirement of ~400-450px.

This is marginal for any computer setup, noone runs the browser full
screen...

Why am i the only one pointing to that issue?

On Feb 10, 12:18 am, pete <[email protected]> wrote:
> 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