Jump to content

How to make a service area map


turkspartan

Recommended Posts

It's just a background picture with some elements placed ontop of it using position: absolute

 

The HTML structure would be something like this:

<div class="map">    <div class="box" style="top: 200px; left: 300px;>City 1</div>    <div class="box" style="top: 142px; left: 30px;>City 2</div>    <div class="box" style="top: 280px; left: 120px;>City 2</div></div>

With CSS:

.map {    position: relative; /* Elements inside will be positioned relative to the top right corner */    width: 800px; /* Width of background image */    height: 600px; /* Height of background image */    background-image: url(map.png);    background-position: top left;}.box {    width: 100px;    height: 40px;    background-image: url(speech-bubble.png);    background-position: top left;    position: absolute;}
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...