#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Location
    NYC
    Posts
    52
    Rep Power
    14

    image maps without the image


    i know it sounds dumb, but is there a way to have something like an image map placed on the page so that an area can become a link?
    "Kama de asobu na."
    -MIKE
  2. #2
  3. No Profile Picture
    Senior Citizen
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2001
    Location
    leftcoast
    Posts
    2,019
    Rep Power
    16
    Like this?

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>untitled</title>
    <style type="text/css">

    div {float:left; cursor:pointer; cursor:hand;}

    #red {width:20%; height:50px; background:red;}
    #blue {width:80%; height:50px; background:blue;}
    #green {width:40%; height:30px; background:green;}
    #yellow {width:60%; height:30px; background:yellow;}
    #tan {width:75%; height:150px; background:tan;}
    #black {width:25%; height:150px; background:black;}
    #orange {width:50%; height:90px; background:orange;}
    #sienna {width:50%; height:90px; background:sienna;}

    </style>
    </head>
    <body>
    <div id="red" onclick="alert(this.id)"></div><div id="blue" onclick="alert(this.id)"></div>
    <div id="green" onclick="alert(this.id)"></div><div id="yellow" onclick="alert(this.id)"></div>
    <div id="tan" onclick="alert(this.id)"></div><div id="black" onclick="alert(this.id)"></div>
    <div id="orange" onclick="alert(this.id)"></div><div id="sienna" onclick="alert(this.id)"></div>
    </body>
    </html>

    Colors just for illustration; the onclick handler scripts your 'link', CSS does the rest. Most HTML elements support onclick (and they may be 'invisible' containers as well). Other ways to do this, too.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Location
    NYC
    Posts
    52
    Rep Power
    14
    i was thinking about doing it will layers and transparent gifs
    "Kama de asobu na."
    -MIKE
  6. #4
  7. No Profile Picture
    Senior Citizen
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2001
    Location
    leftcoast
    Posts
    2,019
    Rep Power
    16
    Why? It's not 1997. Missed my point:
    Most HTML elements support onclick (and they may be 'invisible' containers as well).
    Might want to post a more concise description of what you want to do, so someone can toss out some specifics.

IMN logo majestic logo threadwatch logo seochat tools logo