I have solved the styling problem by toggling custom elements when clicking the markers. I needed to create smaller info windows, so I made a custom element showing up by the marker clicked without the comic style pointer.
google.maps.event.addListener(marker, 'click', function() {
loadInfoWindow(map, marker);
});
function loadInfoWindow(map, marker){
clearInfoWindow();
pixelOffset = getPixelPosInMap(map, marker);
var iwc = ''; // infowindow markup goes here
$('#iwContainer').css({'margin-top':(pixelOffset.y - 100), 'margin-left':(pixelOffset.x - 40)}).html(iwc).fadeIn('fast');
}
function getPixelPosInMap(map, marker){
var scale = Math.pow(2, map.getZoom());
var nw = new google.maps.LatLng(
map.getBounds().getNorthEast().lat(),
map.getBounds().getSouthWest().lng()
);
var worldCoordinateNW = map.getProjection().fromLatLngToPoint(nw);
var worldCoordinate = map.getProjection().fromLatLngToPoint(marker.getPosition());
return new google.maps.Point(
Math.floor((worldCoordinate.x - worldCoordinateNW.x) * scale),
Math.floor((worldCoordinate.y - worldCoordinateNW.y) * scale)
);
}
This code use jQuery to fetch the info window container #iwContainer. I have the following styles for the info window container.
#iwContainer {
position: absolute;
display: none;
background-color: white;
color: #900;
font-size: 10px;
padding: 5px;
width: 90px;
border: 1px solid #900;
border-radius: 5px;
z-index: 100;
opacity: 0.85;
}