Styling your link condoms

A friendly condom cartoon
With all the recent Page Rank jumping up and down I'm sure 1 or 2 people are looking at "nofollow" in a whole new light and not one I approve of, but that said I thought I would have a light hearted look at ways to style a "nofollow" link to help identify them for your users and the possible dangers.

For those unfamiliar with the term link condom, it simply means a link which does not pass any juice, normally this is a simple "nofollow" but it can be redirects and various other techniques as well. I don't know who first coined the term but when combined with Link juice and master link baiter's you begin to realise that perhaps the search engine optimisation industry has a little way to go yet before we reach a level of maturity.

Anyway back to the problem at hand, I have created a tiny little icon icon.gifto indicate a "nofollow" its a badly drawn condom I'm sure some one can do a better job then me.

I have provided several methods of styling all are very accessible with none requiring javascript or similar just plain HTML and a bit of CSS. I know however a few of the examples are not entirely semantic correct.

Example 1 - Class based

This example is based using ClassID to identify the nofollow and then apply styling, its entirely based on the Max Design method for external links,
The HTML Code

<a class="nofollow" href="#">Example 1<span> (No follow has been applied)</span></a>

Notice both the class and the span that a fair few more tags then normal!
The CSS

a.nofollow span
{
position: absolute;
left: -5000px;
width: 4000px;
}
a.nofollow
{
background: url(icon.gif) no-repeat 100% 0;
padding: 0 20px 0 0;
}

View Demo of Example 1

The results however is not bad with the span tag content off the side of the page and the link condom icon applied, one of its limitations is it doesn't give any clue as to what the funny icon means.

Example 2 - attribute based

This version gets a little more clever and uses some nice css trick to pick up the fact that their is "nofollow" in the rel attribute meaning you can do away with the nofollow class.
HTML Code

<a href="#" rel="nofollow">Example 2<span> (No follow has been applied)</span></a>

Still with the Span tag and still no explanation.
CSS

a[rel~="nofollow"] span {
position: absolute;
left: -5000px;
width: 4000px;
}
a[rel~="nofollow"]
{
background: url(icon.gif) no-repeat 100% 0;
padding: 0 20px 0 0;
}

View Demo of Example 2
The results again not bad but still have the issue of not being able to tell the users why the link has a funny shaped icon next to it.

Example 3 - True image substitution

Up until now we have been simply adding an image to the end of the nofollow link and shunting the span tag of the page, however now we want to keep the second tag on the page swapping from span to acronym and use a true image substitution technique.
This is a very ugly hack purists look away now, semantic people go stare at the floor, everyone else enjoy
HTML Code

<a class="example3" href="#" rel="nofollow" title="My stuff">Example 3 <acronym title="NoFollowed Link proceed with caution">NF:</acronym></a>

Notice the acronym tag here, while the NF part will be hidden our full title will be shown as a tooltip.
CSS code

a[rel~="nofollow"] acronym {
float:none;
padding: 8px 8px 8px 8px;
background: url(icon.gif) no-repeat;
font-size: 0.001px;
line-height: 0.001px;
overflow: hidden;
text-decoration:none;
cursor: help;
color:#FFF;
height: 0px !important;
height /**/:17px;
width:17px;
}

View Demo of Example 3
Its a hack but it provides both an image, usable in blind readers and provides information to the readers all in all job done

Bonus Tip - External Links

So you had fun with nofollows but what about just a normal external, or indeed only highlighting external nofollows? Well things get tricky and the easiest way is to go to methods 1 & 2 however if you want to play with negation psuedo classes, then this small trick will be up your street, its adapted from the max design external link idea but with negation psuedo classes.
Note: This works in proper browsers, so those of you using IE will not see anything.
CSS Code

[href^="http://"]:not([href*="timnash.co.uk"]) span
{
position: absolute;
left: -5000px;
width: 4000px;
}
[href^="http://"]:not([href*="timnash.co.uk"])
{
background: url(exicon.gif) no-repeat 100% 0;
padding: 0 20px 0 0;
}

View Demo of Example 4
Remember that doesn't work in IE and I have yet to find a work around so until then its nothing more then an academic curiosity.

RSS feed | Trackback URI | Add your comment!

19 Comments »

Comment by Shana Albert from Social Desire Subscribed to comments via email
2007-10-29 17:44:53
Shana Albert avatar

What a great post, Tim. I have never heard of the term, “Link Condom”…. but there is not a more fitting term for it. Link Condom - a link which does not pass any juice. Love it!!!!

Shana

 
Comment by Tim Nash
2007-10-30 10:43:45

I’m certainly not the first to use the term :) but it is something of apt name and sometimes we need something a little silly in our days even if it is smutty innuendo.

 
Comment by Nick Wilsdon from e3internet Subscribed to comments via email
2007-10-30 12:11:02
Nick Wilsdon avatar

It was Robert Charlton who coined the term over at SEW, with Todd (Oilman) putting up the linkcondom.com site shortly after (although the server seems to be having a bad hair day, not parsing the code atm).

Anyway, interesting post Tim, thanks ;)

 
Comment by Tim Nash
2007-10-30 12:16:34

Cheers Nick now we know, write a blog post and learn something new I’m curious as to what would be at linkcondom.com maybe the server issue will be resolved soon :)

 
Comment by Nick Wilsdon from e3internet Subscribed to comments via email
2007-10-30 12:51:37
Nick Wilsdon avatar

Ah you can always check the cache Tim ;)

http://tinyurl.com/2hg38r

Comment by Tim Nash
2007-10-30 12:56:20

To true and now I know :) pretty much sums up the concept nicely!

 
 
Comment by Pierre Far from eKstrme.com Subscribed to comments via email
2007-10-30 13:10:55
Pierre Far avatar

Great post Tim! I do have one objection though:

NoFollowed Link proceed with caution

If a link is present on my site, I will 100% stand behind it. What kind of service to my users would I be providing if I’m linking to dodgy sites? Yes I moderate all my blog comments and so anything allowed through is vetted.

A better description might be “NoFollowed because Lord Google said I should” or “Advert”.

Pierre

Comment by Tim Nash
2007-10-30 13:17:01

The project this was for had 3 types of links Advertisement, Not Work safe, Not vouched for so the wording certainly isn’t fixed :)

There are times though where you may wish to link to a site but not provide it link juice I have several times wished to highlight bad practices or techniques and not wished to give them any visitors from Google but did feel it was required to fully explain the situation that I linked to them.

The nice thing with these techniques is they are so easily adapted to any situation and not just nofollow one possibility could be to provide individual categories with their own icons on your sites.

 
 
Comment by Johnty from SEO Forensics
2007-11-04 11:16:21
Johnty avatar

From an SEO point of view would the area in the span tag be considered part of the anchor text? or would it be treated seperately?

What about headings, I see a lot of sites that use heading tags and then place a span tag in the middle?

Comment by Tim Nash
2007-11-04 11:22:31

Good question, quick answer don’t know
long answer, nor does anyone else, I have avoided using span tags in headings and certainly wouldn’t include my keywords in such tags, my gut feeling is that Google would be bright enough to realise span tags are often found within headings but then again that might be asking alot, certainly I have used the above and the external link method and have never noticed sites being found from search requests for external link ;)

I think this is one of those subjects that could do with a post of its own.

 
 
Comment by daryl from Web Design Canada Subscribed to comments via email
2007-11-09 07:06:53
daryl avatar

We did a test where I work at Beanstalk Search Engine Positioning that proved the nofollow tag does infact give a tiny bit of link juice in the form of anchor text. It was a few months ago so you’ll have to search through our blog. But we were able to rank a page that didn’t have a keyword in it sheerly by linking with enough no follow tags.

I’ve found the only way to redirect without it giving juice is either some funny form of JS which makes it incompatible to 3% of all users. Or my personal favorite is to create a php script with a header redirect then either point it at a redirect.domain.com, or to a path within the site that is nofollowed. I went with an external domain to make spider the site with Xenu a little bit easier for testing for dead links. Cheers.

Comment by Tim Nash
2007-11-09 08:36:11

Certainly Google has indicated all links are “followed” but the page doesn’t pass any weight. So your test would appear to confirm that but to follow our condom analogy no condom is 100% safe after all,

If you really want to be safe don’t link to them ;) or don’t provide a hyperlink at any rate.

 
 
Comment by John Illnes from resources Subscribed to comments via email
2008-04-10 09:47:32
John Illnes avatar

The official claim is that links with the rel=nofollow attribute do not influence the search engine rankings of the target page. In addition to Google, Yahoo and MSN also support the rel=nofollow attribute.

i think nofollow helps indexing

Comment by Tim Nash
2008-04-10 09:59:01

John I think we all are aware of the official version but unless you do your own tests your relying on rumour and a single line in a help page written by an intern :)

Given your deep comment on the subject I could be cynical and think you were link planting ;) it was only the fact you were so keen to share and commented twice that I let it through. Which reminds me I must put some sort of message to let people know comments are held for moderation on first attempt.

 
 

Responses to this post:

dont be an idiot, use a real name and all comments are moderated
Name Your name not your website(required)
E-mail (required - never shown publicly)
Website address (URL)
Web site name will be used as link text
Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.
Spam protection: Sum of 4 + 9 ?