I know this is an old question but I would like to add a responsive solution. This will adapt nicely on small devices.
@media (max-width: 413px) {
// Set gm container to screen width leaving 20px pad on each side
.gm-style-iw {
width: calc(100vw - 40px)!important;
min-width: unset!important;
max-width: unset!important;
}
// Next is the container Div that you create on your infoWindow function
// on google example var contentString = '<div id="content">'+
.your-main-container-class {
width: calc(100vw - 80px);
padding: 8px 0;
margin: auto;
}
}
Then for bigger screens just set your width as google suggest
.your-main-container-class{
width: 316px; // Your desire width
padding: 8px 0 8px 8px; // Play with padding if you have a custom close button
}