/    Sign up×
Community /Pin to ProfileBookmark

Clickable area example…

The problem is pretty obvious…how can I restrict the clickable area to the link while still displaying the background images…in order to avoid all the jitter…thanks again…sorry for the multiple posts…

[url]http://www.jontakiff.com/circles/[/url]

to post a comment
CSS

5 Comments(s)

Copy linkTweet thisAlerts:
@dtm32236Jan 05.2008 — i would've used an image map... i don't know what to tell you...
Copy linkTweet thisAlerts:
@dtm32236Jan 05.2008 — wait - sorry... i misunderstood that.

you got your answer [url=http://www.webdeveloper.com/forum/showthread.php?t=170063]here[/url]
Copy linkTweet thisAlerts:
@CentauriJan 06.2008 — Interesting effect - couldn't get it to flicker all three at once though ?

Pulling off something like this requires a bit of forward planning. The flicker is due to moving the link backwards in the z-index on hover to place the image behind the others. A better approach is to decide that what you have is going to be the final placement relationship between the circles, and include the overlap of adjacent circles within each graphic. The graphics should be pulled in as tight as possible around each circle (92px square in this case), and the rollover state can be included in each one as well to avoid the delay loading the second image. I reworked the graphics as such, and they are attached here.

The menu should be marked up as an unordered list (for semantics). The <a>s can floated and sized to the graphic (92px square) and the <li>s can also be floated and positioned in relationship with each other using negative margins to provide the overlap. As each graphic contains segments of the adjacent circles, the link can now be brought to the top on hover, giving an acceptable action of hovering off the currently hovered circle to activate the next.

Try this demo with the images I attached (images go in the /images folder) :[CODE]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style type="text/css">
<!--
* {
margin: 0;
padding: 0;
}
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
}
#nav {
float: left;
margin: 25px 0 0 15px;
}
#nav li {
list-style: none;
float: left;
display: inline;
}
#nav a {
float: left;
width: 92px;
height: 92px;
line-height: 92px;
text-align: center;
text-decoration: none;
color: #FF0000;
text-transform: capitalize;
background-image: url(images/circleft.gif);
background-position: left top;
}
#nav a:hover {
background-position: left bottom;
color: #FFFFFF;
position: relative;
z-index: 10;
}
#nav .navlife {
margin-left: -22px;
}
#nav .navlife a {
background-image: url(images/circright.gif);
}
#nav .navhome {
margin-left: -126px;
margin-top: 58px;
}
#nav .navhome a {
background-image: url(images/circbott.gif);
}
-->
</style>
</head>

<body>
<ul id="nav">
<li class="navwork"><a href="work.html">wos</a></li>
<li class="navlife"><a href="life.html">life</a></li>
<li class="navhome"><a href="home.html">home</a></li>
</ul>
</body>
</html>
[/CODE]


[upl-file uuid=3d953db0-d701-4b3f-93d2-b17968bfcf5b size=4kB]circleft.gif[/upl-file]

[upl-file uuid=fba16493-f24b-41f1-b023-76f3c904779a size=4kB]circright.gif[/upl-file]

[upl-file uuid=113a3313-6b3b-43b3-afc9-e32d60be0094 size=4kB]circbott.gif[/upl-file]
Copy linkTweet thisAlerts:
@johnnyblotterauthorJan 06.2008 — yep same issue
×

Success!

Help @johnnyblotter 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 5.27,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...