Image Mapping ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Spudman
    Confirmed User
    • Aug 2002
    • 3198

    #1

    Image Mapping ?

    hi,

    Does anyone know how to image map an image that is the background to a table ?

    here is the code i'm using and its works fine with normal images but when the image is a background its not working.

    <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=500 HEIGHT=200 BACKGROUND="Top.gif" alt="" usemap="#Top_Map">
    <map name="Top_Map">
    <area shape="poly" alt="" coords="172,111, 237,104, 301,101, 374,103, 435,109, 376,123, 314,129, 237,126" href="#">
    </map>

    Cheers for any help

    Spudman.
    Take it Easy !!!
  • sexdwarf
    Confirmed User
    • Jan 2005
    • 196

    #2
    you can only use the usemap attribute for img, object and input (type="image") tags... what are you trying to accomplish since there may be other ways of doing it...
    ICQ me for any programming projects - Agency quality work for non-agency prices
    ICQ 337 028 441

    Comment

    • Spudman
      Confirmed User
      • Aug 2002
      • 3198

      #3
      i have the image background "top.gif" and i need to map a certain part of it. is this possible to do as the image is a set as a background ??
      Take it Easy !!!

      Comment

      • calmlikeabomb
        Confirmed User
        • May 2004
        • 1323

        #4
        You should probably be using css...

        show us the table with the background image and tell us what part needs to be mapped. So we can help you easier....
        subarus.

        Comment

        • Spudman
          Confirmed User
          • Aug 2002
          • 3198

          #5


          if this image was in the table above as its background and i want to have the "G" linked somwhere, this is what i'm trying to achieve. i dont have my specific file uploaded to show you. If anyone can point me in the right direction to sorting this it would be much appreciated.

          Cheers
          Spudman
          Take it Easy !!!

          Comment

          • sexdwarf
            Confirmed User
            • Jan 2005
            • 196

            #6
            with dhtml you can track the mouse coordinates within an object, and have a global hook for the mousedown action... so if the mouse coordinates are within a certain range you can make it perform an action, if not make it ignore and continue it's regular business...

            while not exactly what you need, here is a script i wrote that handles mouse coordinates etc... with some tweaking you could make it work to your needs...

            http://dev3.impactpoint.net/ipMagnify.zip

            (for those wanting to use this script in a commercial project, please read the licencing information, for non-commercial use feel free to play around though)
            ICQ me for any programming projects - Agency quality work for non-agency prices
            ICQ 337 028 441

            Comment

            • Spudman
              Confirmed User
              • Aug 2002
              • 3198

              #7
              cheers sexdwarf,

              anyone know any others ways of achieving this ?
              Take it Easy !!!

              Comment

              • calmlikeabomb
                Confirmed User
                • May 2004
                • 1323

                #8
                Like I mentioned earlier you can use styling sheets.

                Code:
                */ Set margins to align Gmap.gif with background image */
                div.Gmap {
                background-image: url("http://www.url.com/images/Gmap.gif")
                margin: 0px 0px 0px 0px;
                z-index: 1;
                */ Adjust the z-index rendering accordingly */
                }
                Basicly what I am doing here is creating a second image that will be postioned over the area of the background that needs to be mapped.

                In this case, the Gmap.gif will need to be positioned over your table aligned with the "G" in the background.
                Last edited by calmlikeabomb; 02-09-2005, 10:22 AM.
                subarus.

                Comment

                • mortenb
                  Confirmed User
                  • Jul 2004
                  • 2203

                  #9
                  why not just put a transparent gif in an img tag on top of that background.. then you could put the map on the transparent gif..

                  Comment

                  Working...