Hi, I want to define two classes of links, ones to be followed by SEs and ones not (rel="nofollow") 1. May I have two classes of links defined in CSS? 2. How can I set nofollow atribute in CSS? Please help me with short examples Advnced thanks Interval
You can't do it this way. To use nofollow, you have to add rel="nofollow" to the link you don't want to be followed by the search engines, like so. <a href="somebadsite.com/someworsepage.html" [b]rel="nofollow"[/b]>I don't want the search engines to see this link</a> Code (markup): Now, if you're thinking of setting a class for the purpose of hiding the link from users while presenting it to the search engines, forget about it - they WILL find out about it and your site will be de-listed (read: banned).
Thanks Dan, I know that. The question is to do that using CSS. I know I can set atributes for a link using something like a { color: #2e6e15; text-decoration: none; } In this case it is about color and text decoration atributes. What I want to know is if I can set two classes (types) of links, with and without 'nofollow' atribute. If yes I want to see how to do and I want to see how to use each CSS declaration when I build HTML code and I want that some links to be followed and some links not.
<a href="/" rel="nofollow" class="nofollow">No Follow</a> <a href="../">Normal Link</a> Code (markup): a { font-weight: normal; } a.nofollow { font-weight: bold; } Code (markup): Once Internet Explorer gets its' act together on CSS it will be easier. Opera, & I believe but am not quite sure about Firefox, support attribute selectors. /* Anything with a "rel" attribute */ a[rel] { font-weight: bold; } /* Anything with a "rel" attribute that is exactly "nofollow" */ a[rel="nofollow"] { font-weight: bold; } Code (markup):