Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder
    Join Date
    Aug 2005
    Posts
    1,119
    Thanks
    2
    Thanked 1 Time in 1 Post

    Background color of an Area or A in an imagemap

    I have an image with a bunch of white circles on a black background. I made this image into an image map. I have defined an Area inside the map as a circle on one of the round circles, and I want to be able to apply a background color using css to that area. It doesn't look like I can style areas of an image. Any ideas how to do this?

  • #2
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    I tried in vain once to do something very similar with an aerial map to make buildings light up when hovered. I never had any luck with just HTML/CSS. Javascript or flash could handle the job but I can't suggest any code for it since I was only interested in an HTML/CSS-only solution (I never pursued the javascript or flash solution).

    As far as I know there is no other way.

    You need to examine and re-engineer something like this:
    http://davidlynch.org/js/maphilight/docs/demo_usa.html

    The source code for the basic jquery used there can be found here:
    http://plugins.jquery.com/project/maphilight
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •