I'm using the Leaflet Marker Cluster plugin with custom div elements to represent a cluster icon. When a group of markers on a map is clustered, a cluster icon appears in place of them. Hovering over the cluster icon reveals a polygon shape on the map indicating the area the cluster icon covers. I want the icons to sit in the middle of the polygon. However, they all seem to be slightly to the bottom right of the center. Here's an image to show what I mean. The black lined shapes indicate the polygon, the red lines where the middle of the polygon is and the blue circles are the cluster icons.
They blue circles are all slightly to the bottom right of the centre in my application. The CSS for my cluster icons is:
.marker-cluster-div {
width: 40px;
height: 40px;
font-size: 12px;
border-radius: 50%;
color: black;
font-weight: bold;
text-align: center;
vertical-align: middle;
line-height: 40px;
}
Is there any easy way to force an element to the left and up from where it was originally positioned?
marker-cluster-div
looks fine from here! – NoobEditor