/    Sign up×
Community /Pin to ProfileBookmark

All,
I have an the following code:

<img src=”rascal.jpg” width=”600″ height=”800″ border=”0″ usemap=”#Map” />
<map name=”Map” id=”Map”><area shape=”rect” coords=”191,484,406,670″ href=”#” class=”map”/></map>

I want to add a style to the area for on hover etc. So I did this:
</script>
<style type=”text/css”>
map{
border: 0px solid #000000;
}
map:hover{
border: 10px solid #000000;
}
</style>

It shows below the image, why wouldn’t it show it as the area?

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@opifexOct 28.2009 — not sure i'm following... you want to outline the area shape with a border?

not valid. you can use rollover images to highlight the area.

another option is to create your "image map" in css defining each "hot-spot".
Copy linkTweet thisAlerts:
@treeleaf20authorOct 28.2009 — Do you have an example on how to use rollover images to highlight the area. My problem is I don't want anything to show up when the page loads. I only want an image to appear when it's rolled over.
Copy linkTweet thisAlerts:
@opifexOct 28.2009 — This covers javascript pretty well and this is a pure css example.

Use your favorite search engine and you can find hundreds more examples.
Copy linkTweet thisAlerts:
@rnd_meOct 29.2009 — i think map is supposed to be invisible...
×

Success!

Help @treeleaf20 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...