Create Your Own Image Maps in Thesis and WordPress Using CSS

A 4-step tutorial (3 steps for some) to help you create an image map quickly and simply using a few lines of HTML in your post and some CSS styling – code included. Links to additional image map tutorials, free image map editor, free image map tool and examples of image maps used on a variety of sites.

Contents at a Glance

  • How Long Will it Take to Create an Image Map?
  • Create An Image Map Quickly and Simply
  • What You Will Need To Create An Image Map
  • What Is An Image Map?
  • 10 Benefits of Using An Image Map
  • Step 1: Create Your Image & Re-size it if Necessary
  • Step 2: Identify the Pixel Coordinates of the Image
  • NEWSFLASH:Free Software that creates your image map HTML
  • Step 3: Write Your HTML & CSS Code for the Image Map
  • Step 4: If You Need More Information, Help, Examples & Resources…

How Long Will it Take to Create an Image Map?

There are many different ways to create an image map in WordPress and more ways using Photoshop and Dreamweaver. If you are a self-taught hacker like myself, you can easily spend 5 hours creating your image and coding the image map – only to find out that it doesn’t work in WordPress! Stop, read this article and find out how to create an image map in 15 minutes without prior knowledge.

Create An Image Map Quickly and Simply

Okay I confess – I tried at least 6 ways to create a working image map before I got it right. Take out the hour I took creating the image and resizing it so that it all fitted above the fold in my browser, I wasted approximately 4 hours – half a day! Don’t do it the hard way – read on and get yours done in about 15 minutes flat.

Warning: If you are a perfectionist or mess about with your image for hours (like I did because I’m still teaching myself how to use Photoshop) then it will take you longer!

What You Will Need To Create An Image Map

  • An image that you want to have as your image map background. The image below is the one I used on Beyond 2012 HQ and will be the one I give you the html and css for.
  • An image editor program like Photoshop.
  • An HTML or text-editor like Dreamweaver or Notepad for typing the code to copy and paste into your WordPress post/page and custom style sheet.

B2012HQ_portal_imagemap

  • When you hover over each of the words on the above image (you will have to visit the site to see the live image), title text appears telling you about the destination page. If you click on any of these words, you will jump to that page. Just like a ‘real’ website I’m proud to say. Let’s get started so you can make your own.

What Is An Image Map?

If you are still unsure about what an image map is, here is what Wikipedia says:

In HTML and XHTML , an image map is a list of coordinates relating to a specific image, created in order to hyperlink areas of the image to various destinations (as opposed to a normal image link, in which the entire area of the image links to a single destination). For example, a map of the world may have each country hyperlinked to further information about that country. The intention of an image map is to provide an easy way of linking various parts of an image without dividing the image into separate image files.

10 Benefits of Using An Image Map

  • Fewer files: Many WordPress themes use a larger single image for navigation buttons, with the image providing a selection of appearances on the one image by using CSS. download button for image map
    • For example a navigation button is one colour when it is not highlighted and another when it is hovered over or actively in use.
  • Faster page loads: with fewer files to upload to your server and fewer files to download to a visitor’s browser, pages will load more quickly. Visitors won’t have to wait for images to appear if they have already been downloaded to their cache.
  • Looks cool: An image map is a common feature on ‘real’ websites and were not very easy for novices to create until recently.
  • Simple: You don’t have to know how to code a web page in Dreamweaver or slice up an image in Photoshop to create an image map.
  • Sophistication: add an extra element of sophistication to your site.
  • Interactivity: your readers have something to do other than read your text and view your images.
  • Entertainment: An image with lots of links with additional words when hovered over, provides the reader with a game of discovery.
  • Longer visits: Viewing an image map with many options like the one above keeps your readers on your site longer than the average 0-15 seconds.
  • Greater chance of bookmarking: Consider the perceived usefulness of a ‘portal’ page to a visitor versus 20 pages on your site. If they like the image map and think that there is a lot more to explore (when they have more time) they are more likely to bookmark it and/or share it.
  • Learn coding gradually: By creating an image map you will learn about pixels, coordinates, margins, linking, image creation and resizing, html and css – just to mention a few things. By learning something extra every now and again you will escape from your newbie/hacker rank to beginner/novice rank and beyond…you just have to keep learning bit by bit.

Step 1: Create Your Image & Re-size it if Necessary

  • You may already have an image to use or you may want to create one. Work out what size your image needs to be.
    • Does it need to fit in a sidebar, a post, the header, footer, etc?
  • Create a draft post or page and insert your image, save the draft and preview its size in your browser. If you need to resize it after calculating the coordinates for your hotspots, you will take twice as long to create your image map.

The 2012 Alternate Futures image is one I created to display the different elements of the Beyond 2012 HQ website.2012 Alternate Futures image map

The visitor can see in an instant what is on offer and be able to get there within 3 clicks - always best practice. It also provides an interesting ‘call to action‘ in my sidebar. Note: at the time of writing this post, my landing pages are still in development, but they won’t be too far away.

Step 2: Identify the Pixel Coordinates of the Image

This is where you will need an image editor program or similar. By hovering over the image you can identify the x and y and width and height pixel coordinates.

Free image map editors: Try this online image map editor by Peter Schlömer if you have a URL for your image.

  • To use with WordPress, upload/insert your image and identify its URL.
  • If you right click on your image and select view image it will often take you to its unique URL.
  • Copy and paste the image URL and select your hotspot areas with the click of a mouse.

NEWSFLASH: Free Software that creates your image map HTML

I just found a free Image Map Tool that does your HTML for you! Check it out. You can use an image from your computer or from a URL and mark multiple hot spots of different shapes.

Hint: use the SHIFT+click to identify your last coordinate when selecting your hotspot.

The code in this tutorial is for using without CSS. If you want to use the CSS method, keep reading.

Step 3: Write Your HTML & CSS Code for the Image Map

If you don’t use the free tool above…here is the CSS component

I researched many sites to finally find code that worked for me. As I said earlier there are many different ways to create an image map. You can slice an image up in Photoshop and create a page of code (but I had trouble getting it to work inside my WordPress site and don’t know how to insert it into the center of a page using Dreamweaver). You can create an image map in Dreamweaver – and if you know how to do this, why on Earth are you reading this tutorial?! You can use variations of HTML or HTML and CSS. I eventually found a way that worked for me.

Here is the HTML code that I used to insert the above Image and Image Map into a page on my WordPress Thesis site:

<div id="image_map"><a id="link1" title="2012 Beginners Guide" href="http://beyond2012hq.com/2012-beginners-guide/"></a>
<a id="link2" title="2012 Promotion &amp; Education" href="http://beyond2012hq.com/2012-promotion-and-education-products-events/"></a>
<a id="link3" title="2012 Science Fact or Science Fiction" href="http://beyond2012hq.com/2012-science-fact-or-science-fiction/"></a>
<a id="link4" title=" 2012 Conspiracy Theme" href="http://beyond2012hq.com/2012-conspiracy-theme-secret-agenda/"></a>
<a id="link5" title="2012 Prophecy &amp; Prediction" href="http://beyond2012hq.com/2012-prophecy-and-prediction-end-of-the-world/"></a>
<a id="link6" title="2012 New Age" href="http://beyond2012hq.com/2012-new-age-spirituality-metaphysics/"></a>
<a id="link7" title=" 2012 Survivalist" href="http://beyond2012hq.com/2012-survivalist-disaster-preparation/"></a>
<a id="link8" title="2012 Human Progress &amp; Evolution" href="http://beyond2012hq.com/beyond-2012-human-progress-and-evolution/"></a></div>

The “link1″, “link2″… references allow you to add styles to your links using CSS.

Tip: Theoretically, if you had multiple images and inserted hotspots/links in the same place on each image, you would just have to change the image link location and the #name of your image map. For example, always use images the same size and plan to have your hotspots in the same spot. Saves you calculating coordinates each time.

Here is the CSS I used to add the coordinates to the image in my custom style sheet:

The CSS provides the image location and coordinates for the links in your post.

/* wheel image map */
#image_map{
width:583px;
height:550px;
background:url(http://beyond2012hq.com/wp-content/uploads/2009/08/2012wheel_583x550.jpg) no-repeat;
position:relative;
} 

#image_map a{
display:block;
position:absolute;
} 

#image_map a.menu1{
width:165px;
height:75px;
top:50px;
}
#image_map a.menu2{
width:165px;
height:95px;
top:125px;
}
#image_map a.menu3{
width:130px;
height:85px;
top:125px;
}
#image_map a.menu4{
width:150px;
height:100px;
top:250px;
}
#image_map a.menu5{
width:150px;
height:100px;
top:250px;
}
#image_map a.menu6{
width:150px;
height:90px;
top:390px;
}
#image_map a.menu7{
width:185px;
height:90px;
top:390px;
}
#image_map a.menu8{
width:190px;
height:80px;
top:470px;
} 

#image_map a#link1{
left:235px;
}
#image_map a#link2{
left:65px;
}
#image_map a#link3{
left:400px;
}
#image_map a#link4{
left:15px;
}
#image_map a#link5{
left:415px;
}
#image_map a#link6{
left:45px;
}
#image_map a#link7{
left:380px;
}
#image_map a#link8{
left:200px;
}

Hit the save button on your post/page and custom.css file and test it to see if it works.

Tip: If you are creating an image map for posts/pages that don’t exist yet – create these pages and copy and paste the URLs from the address bar. I initially guessed what the URLs would be and ended up having to change them all again when I changed my mind about the page titles :-)

Step 4: If You Need More Information, Help, Examples & Resources…

I found the following sites great for:

  • learning more about image maps
  • discovering I could create an image map myself and use it in WordPress without having to worry about learning how to create a separate HTML webpage and link to it (and link back to my WordPress site again)
  • viewing examples of image maps used on other blogs, including other Thesis sites, and
  • detailed tutorials on how to create an image map.

If you are a little lost with my abbreviated explanation above, please check out some of the sites below:

CSSFlepStudio: a great tutorial – I used the code from this site and adapted it to my own purposes. I found this site after my 5th failed experiment. This is a must read tutorial.

Image map identifying pixel coordinates

Noobcube: a rather complicated tutorial but it has lots of illustrations and a great demo (click on the demo button just below the headline to see what you can achieve). I didn’t use the code from this tutorial because it didn’t serve my purpose; therefore I can’t comment on its effectiveness.

Image map tutorial

RedTuxedo: a Thesis site that uses an image map to link from a mind map to different parts of the page. Similar to using jump links on a page to link to different paragraphs on the same page e.g. contents.

Image map to same page links mind map

MuKaoMedia: an interesting way of using an image map at the bottom of the post.

Simple image links in speech bubbles

TheMarketingTechnologyBlog: a tutorial about using an image map for post footer image links like email, rss and subscribe. I didn’t have any success doctoring this code for my own purposes but that is not to say it won’t work for you.

JimThatcher: another good tutorial with an interesting use of the poly(gon) image map.

Elated: great explanation of coordinates of image maps with good illustrations and code examples. I found this after I found success.

The free Image Map Tool that does your HTML for you – if you decide to use a primarily HTML method.

A free online image map editor by Peter Schlömer to simply get map coordinates.

Free image map editor to identify image coordinates

{ 34 comments… read them below or add one }

George Serradinho September 2, 2009

This is a very well explained post. I have not yet tried it, but it seems that it could be very useful for me. thanks for sharing this info :)
.-= George Serradinho´s last blog ..Free eBooks: Website Traffic & Internet Marketing Dictionary & Bipolar =-.

Reply

mike kirkeberg September 2, 2009

This is a great tutorial. I was just trying to figure out how to create a static front page for a behavioral health blog I write and this is the ticket. Thanks.
.-= mike kirkeberg´s last blog ..10 Ways Your Thinking is Like the Weather =-.

Reply

content management system September 3, 2009

Your article about creating own image in wordpress or thesis proved to be very worthy. Through your tips i can able to create a new one.Thanks

Reply

Internet Business September 9, 2009

This is definitely one of the most descriptive post on how to create image maps. I love the list of resources too. Awesome post.
.-= Internet Business´s last blog ..Internet Business Blueprint, Guide for Internet Entrepreneurs =-.

Reply

Sam Deeks September 9, 2009

Hey, nice and thorough – and thanks for the link to my image map with the cows :-) It’s not exactly rocket-science, but it’s pretty liberating when you work it out (especially if you’re not really techy).

Keep up the good work!

Reply

walpaper September 11, 2009

under the sub topic
“10 Benefits of Using An Image Map” was pleasure to read
thank you
.-= walpaper´s last blog ..Blue Abstract Wallpaper =-.

Reply

Christine September 14, 2009

Hi
thanks for this very detailed article. Generally I know how to create an image map, but I wasn’t aware how to include it in Wordpress – or even that it ios possible to include.
.-= Christine´s last blog ..Annuitätendarlehen Rechner online =-.

Reply

Kathy Stanley September 30, 2009

Thanks for the tutorial. I do have one question however, that I’ve stumbled across during implementation. In your css, you have created the menu classes (ie a.menu1, etc) – however in your html code – am I missing where the menu classes are applied to the div?

Admittedly I’m not the sharpest tack when it comes to css – but I assumed if you were going to create the class, you needed to call it in the html?

Reply

Somone Bull October 11, 2009

I used menu classes for future customisation – no customisations made to my code yet. If you want to in the future they are already labelled.

Reply

Kerry February 20, 2010

I’ve done an image map in Dreamweaver but how do I take the dreamweaver map code and put it into Thesis? I’ve got about 8 map areas and not sure how or where to put this info into Thesis?

Reply

Kerry February 20, 2010

Actually I was able to input the Dreamweaver maping code into a Page and it worked fine, but I’d like to have it look like the Header. I’m only using one page in Thesis, so people can upload images, the rest of the site is HTML. The header graphic has image maps and it worked on a Page, but it sits too low on page.

Reply

Somone Bull February 20, 2010

I don’t have a link to your page so I can’t see the header. I’d just tweak the absolute positioning to lift it up a bit – the coordinates on the image shouldn’t need changing.

Reply

Avinash D March 17, 2010

Hi Somone,

Would this work to build a nav system?

Avi D

Reply

Somone Bull June 23, 2010

Yes. You can use your feature box to insert special images and code.

Reply

lisa June 23, 2010

Thanks for the tutorial. I know this is a stupid question but where do I put the HTML code? I know the css code goes int he custom styles sheet, but I have no idea where to put the html code. Please help

Reply

Somone Bull June 23, 2010

Click on the HTML tab behind the Visual tab – where you create a page/post.

Reply

lisa June 24, 2010

If I am creating an image map for my background image in order to use image maping instead of a navigation menu where would I put the html code?

Reply

Anne August 26, 2010

Wow, you step by step tutorial is simple and easy to follow. The details you’ve written are well done. For a newbie like myself, this is the biggest help I could get. Thank you.

Reply

waLlpApEr September 22, 2010

First of all, this is a great web site you have here. I stumbled upon your website while executing a search on yahoo. Terrific article, I might bookmark it for future reading.

Reply

dante @ make a website October 20, 2010

Thank you for sharing this very detailed post. I usually know how to create a image map but not how to include it in Wordpress. I plan on coming back to your site again real soon.

Reply

Julie November 27, 2010

This is just what I need, but I want to use this for my header (as you have the subscribe in yours) – where do I put the HTML? Do I use the HTML from the image map tool? Sorry, not a CSS?HTML expert! I use thesis theme… thanks!!

Reply

Somone Bull November 27, 2010

Check out this tutorial: http://jacorre.com/design/ads.htm it helps you put an image in your header that is clickable.

Reply

Julie November 27, 2010

Okay, thanks! The only thing is that the “Subscribe” image is already part of the header and blended in. Is is possible to just have an area in the header that when clicked will go to my RSS feed? I hope! :)

Reply

Carl Parker December 23, 2010

Thanks for this! i will try it out as soon as possible, the mukaomedia example is so good :)

Reply

festsange January 2, 2011

Ahhh this post will take my wordpress website to a whole new level. Thanks a lot

—–
Thomas Larsen
Festsange til enhver lejlighed

Reply

Lee January 17, 2011

I guess I know what I’m doing today! Thanks for the great description. I knew this was possible to do, just hadn’t gotten around to doing it yet.

Reply

Krystyn January 31, 2011

Thanks for the tutorial.

Do you know if you can use this mapping on the header in place of the navigation bar, and then have links drop down from them when you hover over them?

Reply

Somone Bull January 31, 2011

You can do anything with code – I just couldn’t tell you what that code is. If you google what you are after, you usually find it these days. Try the Thesis forum first.

Reply

wahyu February 2, 2011

great blog! actualy great header design. I’m wondering how if I want to make the clickable image on header has swap behaviour? please respond me on my email. please….

Reply

Franky March 11, 2011

Wow thanks a lot for this great tutorial, this was what I am looking for.
I just tested a lot but it doesnt work on my wordpress blog. I copy exactly the code just to test it in my style.css and the html code in one of my pages.

The only thing that happend is that I got your picture in my page, but the hover for my mouse doesnt work.

Maybe someone knew my mistake. Thanks a lot.

Reply

Franky March 11, 2011

Ok I found my mistake I doenst used the class for menu in html code. I thought the code would be right. Thanks a lot, I will now test it for my css image map at wordpress

Reply

regina May 13, 2011

I have been all over the internet for days trying to find a tutorial that will tell me how to make the social icons in my header clickable. http://crimescenechick.com
I am not a developer. I have the html code for my image map but do not know enough to write my own css code. I found this website http://www.image-maps.com which generates html and css code that works wonderfully in the preview. However the directions are nil and i do not know how to incorporate the code into WP.org/thesis as it only allow for css and php.

I did try to input the css code into the custom.css but nothing happened. Then someone on the WP.org forum said that I also needed to fo into my file manager and add the html to my header.php. When I did that, I got an error and it took down my site. I am ready to pull my hair out and would appreciate any suggestions.

Thanks.

Reply

tori September 24, 2011

I had an odd experience. My image map worked great when I first put it in to my Thesis site, then it stopped working except for one link. What could cause that? I’m now just making separate buttons instead of an image map.

Thanks!

Reply

Somone Bull September 26, 2011

did you check your code to see if the links were broken or you corrupted them inadvertently by using the WordPress editor.
sometimes using the WordPress editor instead of the file directly from Cpanel deletes some lines.

Reply

Leave a Comment

Previous post:

Next post: