Is image mapping the best solution? - css

I have an image that consists of 5 overlapping rectangles, all of which have its relevant heading on them and must link to its corresponding pages. I have tried uploading the image onto an online image mapping generator which automatically generates the code however, i can only alter the CSS and not the HTML. Would image mapping be the best solution for my problem? or is there any alternative methods i could use which doesn't involve modifying the HTML?
This is my image:
HTML:
<div style="text-align:center; width:406px; margin-left:auto; margin-right:auto;">
<img id="Image-Maps_3201310160406077" src="http://www.image-maps.com/uploaded_files/3201310160406077_home_image.png" usemap="#Image-Maps_3201310160406077" border="0" width="406" height="406" alt="" />
<map id="_Image-Maps_3201310160406077" name="Image-Maps_3201310160406077">
<area shape="rect" coords="72,3,192,43" href="#" alt="" title="" />
<area shape="rect" coords="326,75,401,115" href="#" alt="" title="" />
<area shape="rect" coords="4,290,118,330" href="#" alt="" title="" />
<area shape="rect" coords="241,361,332,401" href="#" alt="" title="" />
<area shape="rect" coords="158,180,249,220" href="#" alt="" title="" />
<area shape="rect" coords="404,404,406,406" href="http://www.image-maps.com/index.php?aff=mapped_users_3201310160406077" alt="Image Map" title="Image Map" />
CSS:
dl.image_map {display:block; width:406px; height:406px; background:url(http://www.image-maps.com/uploaded_files/3201310160406077_home_image.png); position:relative; margin:2px auto 2px auto;}
a.LINK0 {left:72px; top:3px; background:transparent;}
a.LINK0 {display:block; width:122px; height:0; padding-top:42px; overflow:hidden; position:absolute;}
a.LINK0:hover {background:transparent; border:1px dashed black; color:black;}
a.LINK1 {left:326px; top:75px; background:transparent;}
a.LINK1 {display:block; width:77px; height:0; padding-top:42px; overflow:hidden; position:absolute;}
a.LINK1:hover {background:transparent; border:1px dashed black; color:black;}
a.LINK2 {left:4px; top:290px; background:transparent;}
a.LINK2 {display:block; width:116px; height:0; padding-top:42px; overflow:hidden; position:absolute;}
a.LINK2:hover {background:transparent; border:1px dashed black; color:black;}
a.LINK3 {left:241px; top:361px; background:transparent;}
a.LINK3 {display:block; width:93px; height:0; padding-top:42px; overflow:hidden; position:absolute;}
a.LINK3:hover {background:transparent; border:1px dashed black; color:black;}
a.LINK4 {left:158px; top:180px; background:transparent;}
a.LINK4 {display:block; width:93px; height:0; padding-top:42px; overflow:hidden; position:absolute;}
a.LINK4:hover {background:transparent; border:1px dashed black; color:black;}

You can do this with full HTML/CSS if you want, playing with position: absolute, z-index and display: table-cell;
nav {
position: relative;
font-family: Arial;
font-size: 14px;
margin: 20px;
}
nav a {
position: absolute;
top: 0; left: 0;
padding: 10px;
border-radius: 5px;
color: #222;
background: #333;
text-decoration: none;
text-transform: uppercase;
}
nav a:hover {
text-decoration: underline;
}
nav a span {
display: table-cell;
width: 145px; height: 145px;
}
.link-home {
top: 115px; left: 115px;
color: white;
line-height: 145px;
font-size: 24px;
background: #C1272C;
box-shadow: 0 0 10px 0 #333;
z-index: 5;
}
.link-printed-digital-media {
top: 0; left: 65px;
background: rgba(50, 50, 50, .8);
z-index: 4;
}
.link-file-sharing {
top: 70px; left: 185px;
background: rgba(50, 50, 50, .6);
z-index: 3;
}
.link-external-links {
top: 185px; left: 165px;
background: rgba(50, 50, 50, .4);
z-index: 2;
}
.link-stock-management {
top: 165px; left: 0;
background: rgba(50, 50, 50, .2);
z-index: 1;
}
/* size */
.link-printed-digital-media span,
.link-external-links span {
height: 200px;
}
.link-file-sharing span,
.link-stock-management span {
width: 200px;
}
/* align */
.link-home span {
text-align: center;
}
.link-file-sharing span,
.link-external-links span {
text-align: right;
}
.link-external-links span,
.link-stock-management span {
vertical-align: bottom;
}
<nav>
<a href="#" class="link-home">
<span>Home</span>
</a>
<a href="#" class="link-printed-digital-media">
<span>Printed &<br>Digital Media</span>
</a>
<a href="#" class="link-file-sharing">
<span>File<br>Sharing</span>
</a>
<a href="#" class="link-external-links">
<span>External<br>Links</span>
</a>
<a href="#" class="link-stock-management">
<span>Stock<br>Management</span>
</a>
</nav>
Please note <span> are required, as you cannot combine table-cell and absolute positioning on the same element.

If you stack the html elements using a z-index (in CSS) with the right size on the right position, and add hyperlinks with images to it, it should work correctly right?
Check out this example to see how it could work.
<html>
<head>
<style>
/* setup container */
.nav-wrapper
{
position:relative;
width:500px;
height:500px;
background:#f0f0f0;
}
/* on each item */
a.nav-item
{
position:absolute;
width:200px;
height:200px;
}
/* per specific item, note the position and the z-index */
.home {
left: 120;
top: 135;
z-index:5; /*on top*/
background:rgba(250,50,50,.9);
}
.print {
left:80;
top: 30;
z-index:1; /*on bottom*/
background:rgba(60,60,60,.5);
}
.fileshare {
left: 40;
top: 180;
z-index:2;
background:rgba(50,50,50,.5);
}
.stock {
left: 235;
top: 220;
z-index:3;
background:rgba(70,70,70,.5);
}
.links {
left: 240;
top: 50;
z-index:4;
background:rgba(80,80,80,.5);
}
/* for example only */
.nav-item img
{
width:200px;
height:200px;
}
</style>
</head>
<body>
<div class="link-wrapper">
<!-- items over here. note the classes -->
<a href="print.html" class="nav-item print">
<img src="print.png" alt="print" />
</a>
<a href="fileshare.html" class="nav-item fileshare">
<img src="fileshare.png" alt="fileshare" />
</a>
<a href="home.html" class="nav-item home">
<img src="home.png" alt="home"/>
</a>
<a href="stock.html" class="nav-item stock">
<img src="stock.png" alt="stock" />
</a>
<a href="links.html" class="nav-item links">
<img src="links.png" alt="links" />
</a>
</div>
</body>
</html>

Related

How can I fix my slideshow, it keeps loading without displaying pictures on Android

This is the code:
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script><script language="javascript">'use strict';$(function() {var width = 720; var animationSpeed = 2500; var pause = 5000; var currentSlide = 1;var $sdr2337 = $('#sdr2337'); var $slideContainer = $('.sld', $sdr2337); var $sld = $('.slide', $sdr2337); var interval; function startsdr2337() { interval = setInterval(function() { $slideContainer.animate({'margin-left': '-='+width}, animationSpeed, function() {if (++currentSlide === $sld.length) {currentSlide = 1; $slideContainer.css('margin-left', 0); }});}, pause);} function pausesdr2337() {clearInterval(interval);}$slideContainer.on('mouseenter', pausesdr2337).on('mouseleave', startsdr2337);startsdr2337();});</script><div style="width: 720px; margin: 0 auto;"><div style="position: relative; width: 720px; "><style type="text/css">#gpoy {position: absolute; right:-168px; top:3px; padding: 8px 0px 3px; z-index:99; opacity: 0.9; transition: 1s; line-height: 12px;}.repper {width: 726px; margin: 0 auto; position: relative; overflow: hidden; border-radius: 20px; box-shadow: 7px 7px 9px #888888 ;}.repper:hover #gpoy {transition: 2s; right:23px; }</style><div class="repper"><div id="gpoy"><a style="font-weight: normal; text-shadow: 1px 1px #555555; color: #FFFFFF; text-decoration:none; font-size: 8pt; line-height:10px; font-family: arial;" href="http://www.123-slideshow.com" target="_blank">🍉 CSS3 Slider</a></div><style type="text/css">#sdr2337 {width: 720px; height: 400px; border: 3px solid #FFFFFF; border-radius: 20px; overflow: hidden; position: relative; cursor: pointer; }#sdr2337 .sld {width: 2880px; height: 400px; display: block; margin: 0; padding: 0;}#sdr2337 .slide {width: 720px; height: 400px; float: left; list-style-type: none;}.DOT180906 {position: absolute; max-width: 720px; margin: 0px;}.c128165 {position: absolute; bottom: 0px; width:100%; padding: 12px; background-color: rgba(0, 0, 0, 0.5); color: #FFFFFF; font-size:24pt; font-family:Tahoma; text-align:center; line-height:48px; z-index:33; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;}</style>
<div id="sdr2337">
<ul class="sld">
<li class="slide slide1">
<figure class="DOT180906">
<img src="https://3.bp.blogspot.com/-Z5b_SCr5Nck/W44VsqizSHI/AAAAAAAACas/GC6fdSiHFbYprgCByBGqiFQjVaG15mEqQCLcBGAs/s1600/images%25286%2529.jpg" />
<figcaption class="c128165">
The attitude of Failure
</figcaption>
</figure>
</li>
<li class="slide slide2">
<figure class="DOT180906">
<a href="http://#" target="_blank"> <img src="123-slideshow/knowledge.png" />
<figcaption class="c128165">
Knowledge
</figcaption></a>
</figure>
</li>
<li class="slide slide3">
<figure class="DOT180906">
<a href="http://#" target="_blank"> <img src="123-slideshow/the-best-way-to-save.jpg" />
<figcaption class="c128165">
The best way to save
</figcaption></a>
</figure>
</li>
<li class="slide slide1">
<figure class="DOT180906">
<img src="123-slideshow/the-attitude-of-failure.jpg" />
<figcaption class="c128165">
The attitude of Failure
</figcaption>
</figure>
</li>
</ul></div></div></div>
</div>
I found the answer to my question and I'm willing to share in case someone else have this same question in the future.
Information I would have provided include:
Name of site- www.knowseeker.com
Platform- blogger
Template- custom
Now, the slider code above should work in any html widget. The real problem was were I inserted it. [Search for tutorials on how to code for slider with css and js if you are a novice on that topic.]
The slider widget for my template provided by sorella templates is already configured to display slides pointing to my posts depending on the label you provided.
The default field has some items as follows: 5/Fashion/slider which represents (number of post slides to display)/(labels of posts to display)/(slider, to evoke the script)
So you don't need to insert any code here. Simply revert to default code by typing the format I provided above you have already replaced the code. Use any label you desire and ensure that your desired posts also have that label.

divs move when hovering over other divs

I have a few work thumbnail divs in a container When I hover over one specific one, it shifts the ones after it along the next row. How can I resolve this?
HTML:
<div class="blog-container">
<h1>PRINT</h1>
<div class="work_thumbs">
<li class="print">
<div><img src="../Images/Tree Top News/Thumbs/TTN2.jpg" alt="Tree Top" border="0" class="thumb">TREE TOP NEWS</div>
</li>
<li class="print">
<div><img src="../Images/Harrow Council/Thumbs/Harrow Logo.jpg" alt="Harrow Council" border="0" class="thumb">HARROW COUNCIL</div>
</li>
<li class="print">
<div><img src="../Images/Regent/Thumbs/Regent logo.jpg" alt="Regent Care" border="0" class="thumb">REGENT CARE SERVICES</div>
</li>
<li class="print">
<div><img src="../Images/NLCS/Thumbs/NLCS logo.jpg" alt="NLCS" border="0" class="thumb">NLCS</div>
</li>
<li class="print">
<div><img src="../Images/Aish/Thumbs/AHC.jpg" alt="Aish" border="0" class="thumb"> AISH</div>
</li>
<li class="print">
<div><img src="../Images/FJL/Thumbs/FJL.jpg" alt="chicago graphic design" border="0" class="thumb">FJL</div>
</li>
<li class="print">
<div><img src="../Images/Tree Top News/Thumbs/TTN.png" alt="Canons high school" border="0" class="thumb">CANONS HIGH SCHOOL</div>
</li>
</div>
</div>
CSS:
.blog-container {
height: 100%;
width: 100%;
margin-top: 37px;
background-color:
}
.work_thumbs {
width:1000px;
margin: 0px auto 0 auto;
float: left;
}
.work_thumbs li {
margin: 0px 15px 15px 0px;
list-style-type: none;
display: block;
float: left;
display: inline;
font-family: "geogtq md";
color: #FFF;
overflow: hidden;
}
.work_thumbs li a {
float: inherit;
display: block;
width: 230px;
padding-bottom: 50px;
font-family: "geogtq md";
color: #00BDE5;
height: 200px;
border: 1px solid #02BDE5;
overflow: hidden;
}
.work_thumbs li .type {
color: #01BDE6;
}
.work_thumbs li a:hover {
background-color: #ceeef6;
border-bottom: 1px solid #a2a2a2;
text-decoration: none;
margin-bottom: -1px;
color: #007789;
font-family: "geogtq md";
}
.work_thumbs li .thumb {
margin-bottom: 15px;
display:block
}
element:hover{url('pathToImg.png'); position:relative; z-index:1;}
Make z-index:1 a higher index to suit your needs, and include a height and width as well.
You are changing the dimensions of your divs upon hover, by adding the negative margin-bottom. this causes your floating divs to 'hook' upon hover, in stead of starting at the left.
Here you can see it in action: http://jsfiddle.net/P8xEN/

Positioning problems with internet explorer (basic CSS)

I'm attempting to create a website like this http://www.spookycraft.net/ and whenever I run my site in IE it looks terrible everything is pushed to the left and all of the images are separated, Tho in Chrome and firefox they look perfect (as in all centered and the transition is there) here's the fiddle
http://jsfiddle.net/EuRJE/
Here's the testing site: http://www.wandernetwork.com/
and here's the code:
also keep in mind i'm somewhat novice so if you have any pointers for me or additional tips they would be greatly appreciated.
<head>
<meta charset='UTF-8'>
<title>Wandercraft Network</title>
<style media="screen" type="text/css">
#page-wrap {
width:620px;
margin:0px auto;
}
.slide-up-boxes a {
display:block;
width:300px;
height:300px;
background: #eee;
overflow:hidden;
}
.slide-up-boxes h5 {
height:300px;
width:300px;
text-align:center;
line-height:150px;
-webkit-transition: margin-top 0.3s linear;
background-color:#white;
}
.slide-up-boxes a:hover h5 {
margin-top:-300px;
}
.slide-up-boxes div {
text-align:center;
height:300px;
width:300px;
opacity:0;
background-color:orange;
-webkit-transform: rotate(6deg);
-webkit-transition: all 0.2s linear;
}
.slide-up-boxes a:hover div {
-webkit-transform: rotate(0);
opacity:1;
}
.slide-up-boxes {
margin:5px;
width:300px;
float:left;
}
.banner {
margin:0px auto;
display:block;
padding:15px;
width:1000px;
height:300px;
}
/* Limit the width of the tray to 30px to make it stack vertically*/
#enjin-tray {
max-width: 30px;
margin: 0;
bottom: 175px;
}
#enjin-tray li#notificationpanel {
border-radius: 3px;
}
#enjin-tray ul li.tray-item {
border-style: solid;
border-width: 1px;
}
#notificationpanel .notification-icon.apps {
background-position: -84px 3px;
}
#notificationpanel .notification-icon.general {
background-position: -54px 3px;
}
#notificationpanel .notification-icon.messages {
background-position: -25px 3px;
}
#notificationpanel .notification-icon.dashboard {
display: none;
}
#enjin-tray li#notificationpanel .subpanel {
width: 380px;
bottom: 0;
}
#enjin-tray #notificationpanel .subpanel.general {
right: 40px;
}
#enjin-tray #notificationpanel .subpanel.messages {
right: 40px;
}
#enjin-tray .subpanel {
right: 40px;
}
#enjin-tray #notificationpanel .subpanel.apps .faux-icon {
display: none;
}
#enjin-tray #notificationpanel .subpanel.general .faux-icon {
display: none;
}
#enjin-tray #notificationpanel .subpanel.messages .faux-icon {
display: none;
}
#messages-notification-tip {
bottom: 231px !important;
right: 35px !important;
}
#general-notification-tip {
bottom: 205px !important;
right: 35px !important;
}
#apps-notification-tip {
bottom: 180px !important;
right: 35px !important;
}
.triangle {
display: none;
}
#enjin-tray-messaging {
display: none;
}
</style>
</head>
<body>
<img src="https://dl.dropboxusercontent.com/u/85261154/WN_Banner.png" border="0px" class="banner">
<div id="page-wrap">
<section class="slide-up-boxes"> <a href="www.reddit.com">
<img src="https://dl.dropboxusercontent.com/u/85261154/PVP.png">
<div>
<h5> <img src="http://www.backbonetechnology.com/media/blog-html5-logo.png"> </h5>
</div>
</a>
</section>
<section class="slide-up-boxes"> <a href="www.reddit.com">
<img src="https://dl.dropboxusercontent.com/u/85261154/Kingdoms.png">
<div>
<h5> <img src="http://www.backbonetechnology.com/media/blog-html5-logo.png"> </h5>
</div>
</a>
</section>
<section class="slide-up-boxes"> <a href="www.reddit.com">
<img src="https://dl.dropboxusercontent.com/u/85261154/Survival.png">
<div>
<h5> <img src="http://www.backbonetechnology.com/media/blog-html5-logo.png"> </h5>
</div>
</a>
</section>
<section class="slide-up-boxes"> <a href="www.reddit.com">
<img src="https://dl.dropboxusercontent.com/u/85261154/Factions.png">
<div>
<h5> <img src="http://www.backbonetechnology.com/media/blog-html5-logo.png"> </h5>
</div>
</a>
</section>
<div style="clear:both;"></div>
</div>
</body>
Any help would be appreciated if I find the answer I'll be sure to update this post, Thank you for reading.
What version of IE are you using? Your page looks fine on IE10.
I can't help you if you are running an older version, but have a look at this :
Imitate CSS3 transition in IE?
-webkit-transition won't work on IE.

HTML5 WebPage - icon positioning like windows 8 start screen

This is what i want to make: http://www.prikachi.com/images/743/5697743V.png
But when i try to make it i get this: http://www.prikachi.com/images/742/5697742I.png
How can i make it possible? I don't use tables.
There are good examples how to make webpage with metro theme but i don't want to use jQuery or JavaScript.
Sorry if there is similar question but i can't find it. Thanks :)
style.css
#font-face{
font-family: OpenSans;
src: url("opensans-light.ttf");
}
body{
background-color: #260930;
font-family: OpenSans;
}
header{
color: white;
font-size: 48px;
}
footer{
text-align: center;
color: white;
font-size: 12px;
}
.content{
height: 80%;
overflow: hidden;
}
.content .items{
padding: 0 20px;
position: relative;
overflow: hidden;
}
.icons{
position: relative;
top: 50%;
left: 50%;
}
.box{
float: left;
position: relative;
margin: 8px;
padding: 8px;
background: #555;
text-decoration: none;
cursor: pointer;
overflow: hidden;
color: #fff;
background: #00a8ec;
z-index: 9;
width: 240px;
height: 128px;
}
.box:hover{
opacity: 0.85;
}
.box span{
color: white;
position: absolute;
left: 5px;
bottom: 5px;
font-size: 15px;
font-weight: normal;
z-index: 8;
}
.box img{
position: absolute;
left: 50%;
top: 50%;
margin-left: -32px;
margin-top: -32px;
z-index: 7;
}
.box img.cover{
position: absolute;
margin: 0 auto;
top: 0px;
left: 0px;
width: 100%;
z-index: 6;
}
.photos{
width: 512px;
height: 288px;
}
.width1{width: 120px;}
.height1{height: 120px;}
index.html:
<!DOCTYPE HTML>
<html>
<head>
<title>Metro theme site</title>
<link rel="stylesheet" href="style.css"/>
<meta charset="windows-1251"/>
</head>
<body>
<div class="content">
<div class="items">
<a href="#" class="box" style="background: #f58d00;">
<span>Firefox</span>
<img src="images/firefox.png" alt="" />
</a>
<a href="#" class="box" style="background: #d68a3a; top: auto;">
<span>About me</span>
<img src="images/aboutme.png" alt="" />
</a>
<a class="box photos" style="box-align: start;" href="#">
<span>Photos</span>
<img class="cover" src="http://www.hdwallpapersarena.com/wp-content/uploads/2012/04/HD-wallpaper-2.jpeg" alt="" />
</a>
<a href="http://www.facebook.com/megapro189" target="_blank" class="box width1 height1" style="background: #3b5a9b;">
<span>Facebook</span>
<img src="images/facebook.png" alt="" />
</a>
<a href="#" class="box width1 height1" style="background: #f21d1d;">
<span>Projects</span>
<img src="images/projects.png" alt="" />
</a>
<a href="#" class="box width1 height1" style="background: #00aaf1;">
<span>Skype</span>
<img src="images/skype.png" alt="" />
</a>
<a href="#" class="box width1 height1" style="background: #00aaf1;">
<span>Skype</span>
<img src="images/skype.png" alt="" />
</a>
<a href="#" class="box width1 height1" style="background: #00aaf1;">
<span>Skype</span>
<img src="images/skype.png" alt="" />
</a>
</div>
</div>
</body>
</html>
You should also tell us the browser used...
If you use chrome or firefox with firebug, open the debugger (ctrl+shift+j with chrome) and try to edit style in live, to localise your problem.
DEMO
HTML
<div id="top-left">
<div id="ff">Firefox</div>
<div id="am">About me</div>
</div>
<div id="top-right">
<div id="bp">Box Photos</div>
</div>
<div id="bottom">
<div id="fb">Facebook</div>
<div id="pj">Projects</div>
<div class="sk">Skype</div>
<div class="sk">Skype</div>
<div class="sk">Skype</div>
</div>
CSS
#top-left, #top-right {
float:left;
}
#bottom {
clear:both;
}
#ff, #am, #bp {
margin:16px 8px;
padding:8px;
height:128px;
width:240px;
}
#ff {
background-color:orange;
}
#am {
background-color:tan;
}
#bp {
height:288px;
width:512px;
background-color:blue;
}
#fb, #pj, .sk {
margin:0px 8px;
padding:8px;
height:120px;
width:120px;
float:left;
}
#fb {
background-color:navy;
}
#pj {
background-color:maroon;
}
.sk {
background-color:lightblue;
}​

overlapping photos

Im trying to set up a way of viewing photos when you hover over them and im having some trouble with floating and positioning. I've got it to work like this...
**HTML**
<div id="container-collection">
<div id="clothes1"><img src="Images/smallest/JPEG/IMG_3148.jpg" alt="1" width="211" height="316" onMouseOver="MM_showHideLayers('closeup1','','show')" onMouseOut="MM_showHideLayers('closeup1','','hide')"></div><div id="clothes2"><img src="Images/smallest/JPEG/IMG_3124.jpg" alt="2" width="211" height="316" onMouseOver="MM_showHideLayers('closeup2','','show')" onMouseOut="MM_showHideLayers('closeup2','','hide')"></div>
<div id="closeup1"><img src="Images/Smaller/bigger ones/JPEG/IMG_3148_1.jpg" width="432" height="648" alt="11"></div> <div id="closeup2"><img src="Images/Smaller/bigger ones/JPEG/IMG_3124_1.jpg" width="432" height="648" alt="11"></div>
</div>
**CSS**
#container-collection { width: 900px; margin:0 auto; padding-top: 90px; }
#clothes1 { float:left; left:0px; top:5px; width:209px; height:316px; z-index:1; }
#clothes2 { float:left; left:5px; top:5px; width:209px; height:316px; z-index:1; }
#closeup1 { float:left; left:400px; top:-316px; width:427px; height:648px; z-index:2; visibility: hidden; }
#closeup2 { position:relative; left:423px; top:-648px; width:427px; height:648px; z-index:3; visibility: hidden; }
but theres got to be a better way.
Cheers.
There are many JavaScript plugins you can use to quickly achieve this.
For example, try the bootstrap plugin:
http://twitter.github.com/bootstrap/javascript.html#popovers
NB: the data-content attribute in the <a> tag could hold HTML content. Just look out for the use of quotes.
<a href="#" rel="popover" data-content="<img src='image2.jpg' />" data-original-title="A Title">
<img src="image1.jpg" border="0" />
</a>
Optionally, a much simpler version to show a preview can be done with CSS only, utilizing hover.
<style>
a.info
{
position: relative; /*this is the key*/
z-index: 204;
color: #000;
text-decoration: none;
}
a.info:hover
{
z-index: 205;
background-color: gainsboro;
}
a.info span{display: none}
a.info:hover span
{
/*the span will display just on :hover state*/
display: block;
position: absolute;
top: 3em;
left: 1em;
}
</style>
<a class="info" href="javascript:focus();">
<img src="image1.jpg" /><span><img src="image2.jpg" /></span>
</a>

Resources