• Hi,

    For most of my markers, the infowindow is too big. I know I can change the width for all infowindows in settings, but how can I have it automatically adjust based on the length of the text in the infowindow? I added “width: auto” to CSS class .gm-style-iw but that didn’t do anything. Decreasing the global width would cause some of the infowindows to have horizontally scrolling, which I don’t want.

    Thanks,
    Tyler

    https://www.ads-software.com/plugins/wp-google-maps/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WPGMaps

    (@wpgmaps)

    Hi Tyler

    We’ve put a minimum width in as some theme’s have conflicting styles which bring in scrollbars into the infowindow.

    What you can do in the meantime, is open wpGoogleMaps.php and search for this line:

    var html='<p style=\'min-width:100px; display:block;\'>'+wpmgza_address+'</p>'+d_string;

    That should be around line 1808. Remove the “min-width” CSS. Does this help?

    Thread Starter tszabo

    (@tszabo)

    Hi,

    I did that but nothing happened. Note: I have Pro version, but I revised the basic version file. Pro support has not been answering my question from a week ago so I posted here.

    You can see what I mean by going to one of my maps and clicking the northern most marker. (It doesn’t look so bad here because it’s a large map, but on most of my pages the maps are much smaller)

    What else?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Infowindow – make width auto?’ is closed to new replies.