Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Image Map Code Doesn't Work?
Old 11-18-2011, 12:55 PM Image Map Code Doesn't Work?
@SickFooDino's Avatar
Skilled Talker

Posts: 60
Name: Dino
Location: In A State Of Trance<3(:
Trades: 0
For some reason It has always worked but here my site

www.team-illuminate.com

see the facebook & youtube images, they are both image mapped but for some reason it doesn't work?

here is my source code

*IGNORE THE OK's YOU SEE* lol i just left it ;b

HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Team Illuminate</title>
<style type="text/css">
/* Remove margins from the 'html' and 'body' tags, and ensure the page takes up full screen height */
html, body {height:100%; margin:0; padding:0;}
/* Set the position and dimensions of the background image. */
#page-background {position:fixed; top:0; left:0; width:100%; height:100%;}
/* Specify the position and layering for the content that needs to appear in front of the background image. Must have a higher z-index value than the background image. Also add some padding to compensate for removing the margin from the 'html' and 'body' tags. */
#content {position:relative; z-index:1; padding:10px;}
.style1 {color: #FF0000}
</style>
<!-- The above code doesn't work in Internet Explorer 6. To address this, we use a conditional comment to specify an alternative style sheet for IE 6 -->
<!--[if IE 6]>
<style type="text/css">
html {overflow-y:hidden;}
body {overflow-y:auto;}
#page-background {position:absolute; z-index:-1;}
#content {position:static;padding:10px;}
</style>
<![endif]-->
</head>
<body>
    <div id="page-background"><img src="http://team-illuminate.com/testpng.png" alt="Smile" width="100%" height="100%" border="0" usemap="#Map">
<map name="Map"><area shape="rect" coords="293,147,343,203" href="http://www.facebook.com/TEAMILLUMINATE" target="_blank" alt="Team Illuminate On Facebook">
<area shape="rect" coords="344,149,399,202" href="http://youtube.com/xteamilluminatex" target="_blank" alt="Team Illuminate On Youtube">
</map></div>
    
    <h2 class="style1">OK OK OK OK</h2>
    <p class="style1">OK OK OK OK  </p>
    <p class="style1">&nbsp;</p>
    <p class="style1">&nbsp;</p>
    <p class="style1">&nbsp;</p>
    <p class="style1">&nbsp;</p>
    <p class="style1">&nbsp;</p>
    <p class="style1">&nbsp;</p>
    <p class="style1">&nbsp;</p>
    <p class="style1">&nbsp;</p>
    <center><iframe width="500" height="339" src="http://www.youtube.com/embed/FnLWpV4a69c?rel=0" frameborder="0" allowfullscreen></iframe></center>
</body>
</html>
__________________

Please login or register to view this content. Registration is FREE
@SickFooDino is offline
Reply With Quote
View Public Profile Visit @SickFooDino's homepage!
 
 
Register now for full access!
Old 11-22-2011, 06:44 AM Re: Image Map Code Doesn't Work?
Kelpie's Avatar
Skilled Talker

Posts: 82
Name: Andrew
Location: SW Scotland
Trades: 0
It does work... if you resize your browser window to approx 700 x 440 px .

The problem is that the area coordinates are fixed (pixel) positions, while the map is fluid (%) height and width.
I don't think you can get an image map to work with percentage coordinates, so the only solutions I can see would be to either:

1. make the image map fixed width & height
or
2. use js to detect the window width & height, and to convert percentage coordinates to pixel coordinates accordingly

Last edited by Kelpie; 11-22-2011 at 06:56 AM.. Reason: Rewording
Kelpie is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Image Map Code Doesn't Work?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.19283 seconds with 12 queries