I can't put an image map into this strange css text.... help?

Discussion in 'CSS' started by jimsmith, Apr 12, 2006.

  1. #1
    This is the area with the image in it.

    <style type="text/css">
    .left {
    position: absolute;
    left: 0;
    width: 180px;
    height: 338px;
    background-image: url(/pictures/menu2.gif);
    </style>

    I created the map (coordinates and all) and named it map1.

    I tried doing this :

    .left {
    position: absolute;
    left: 0;
    width: 180px;
    height: 338px;
    background-image: url(/pictures/menu2.gif USEMAP="#map1");

    but that didn't work.... any ideas?
     
    jimsmith, Apr 12, 2006 IP
  2. Slapyo

    Slapyo Well-Known Member

    Messages:
    266
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    108
    #2
    I don't think you can make a background image an image map. I believe it has to be an actual <img> tag on the page.
     
    Slapyo, Apr 13, 2006 IP
  3. penagate

    penagate Guest

    Messages:
    277
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Image map using CSS and XHTML:

    frankmanno.com/ideas/css-imagemap/

    (Sorry, can't link tag for another 3-4 days ;))

    - P
     
    penagate, Apr 13, 2006 IP
    Slapyo likes this.
  4. Slapyo

    Slapyo Well-Known Member

    Messages:
    266
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    108
    #4
    Awesome, thanks for the link. I wasn't aware that this could be done, but obviously it can.

    jimsmith, post your solution up when you get it working, I'd like to see it.
     
    Slapyo, Apr 13, 2006 IP
  5. jimsmith

    jimsmith Peon

    Messages:
    629
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #5
    yea, thanks for the link penagate,
    here's another that's linked from the page you gave me. http://evan.nixsys.bz/note/
    but since this is the first time I'm dealing with css, the explanations seem to be a little out of my league.
    I will keep trying, but I'm also going to look for a way to call my image with a regular <img> tag, instead of it being a background image.
     
    jimsmith, Apr 14, 2006 IP