I have successfully positioned markers on a map using FontAwesome to ensure they maintain their relative position when the map is resized.
Currently, each marker consists of a number inside a circle created with FontAwesome. However, I am interested in utilizing a pseudo-element to position the number within the circle and consolidate it into one marker.
Despite trying various approaches, I have not been able to achieve this desired outcome.
Please refer to the example provided below;
.map-marker {
position: absolute;
font-size: 20px;
text-shadow: 1px 1px 1px #000;
}
#one {
top: 70px;
left: 20px;
}
#one:after {
content: "\f111";
font-family: 'FontAwesome';
}
#two {
top: 50px;
left: 260px;
}
#two:after {
content: "\f111";
font-family: 'FontAwesome';
}
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="map_container">
<img src="http://geology.com/world/world-map-clickable.gif"/>
<a href="#"><div id="one" class="map-marker" aria-hidden="true">1</div></a>
<a href="#"><div id="two" class="map-marker" aria-hidden="true">2</div></a>
</div>