HTML CSS examples for CSS Widget:Image
Absolute position of DIVs with a background image
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .div-bg {<!-- w w w .j ava 2 s . com--> height:501px; min-height:501px; background-size:contain; background-repeat:no-repeat; background-position:51% 51%; position:relative; width:501px; } .cities { border:2px solid Chartreuse; width:11px; height:11px; border-radius:51%; background-color:yellow; } .cities.Delhi { position:absolute; top:151px; left:176px; } .cities.Bangalore { position:absolute; top:251px; left:276px; } </style> </head> <body> <div class="div-bg" style="background-image:url('https://image.ibb.co/f1qio5/insights_indiamap.jpg')"> <div class="cities Delhi"></div> <div class="cities Bangalore"></div> </div> </body> </html>