Forum Moderators: not2easy

Message Too Old, No Replies

Turn-off hyperlinks using CSS

Need to suppress hyperlinks on a static page

         

julmak

3:38 am on Aug 26, 2005 (gmt 0)

10+ Year Member



Does anyone know of a way to turn off hyperlinks associated with "a href" tags? The tags I need to supress have a class so I can isolate them, but I can't figure out a way to make the links un-clickable. The best I can do is remove the underline and change the color of the link.

Any ideas would be appreciated.

D_Blackwell

3:57 am on Aug 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If they are not to be clickable, do they really need to be <a>? You can always use href="same-page.html" or some such, which will give the effect of a link that does nothing, but maybe there is another way to go.

julmak

4:13 am on Aug 26, 2005 (gmt 0)

10+ Year Member



Unfortunately I cannot access the HTML. It's all hard coded. Here's an example of the the pages look like: <No site specifics, thanks. See TOS #13 [WebmasterWorld.com]>

All of the links that appear after the dates are what I want to turn off.

My guess is that the answer is no... but I figured it was worth a shot.


<td>
<span class="SS_JournalCoverageDates">from 05/01/1990 to 02/01/2004</span> in <a href="example.com" class="SS_JournalHyperLink" target="_blank">example link</a>
</td>

Mod Note: removed link and added sample code

[edited by: SuzyUK at 9:31 am (utc) on Aug. 26, 2005]

Robin_reala

10:43 am on Aug 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not by CSS, no. You wcould write a small script that selected the tags by class then set the href attribute to '#'.

benihana

10:46 am on Aug 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you want the link to still display, but not be a link, or to not be there at all?

If you want to get rid completely, use:

.SS_JournalHyperLink {
display:none;
}

jetboy

11:25 am on Aug 26, 2005 (gmt 0)

10+ Year Member



If you can change the colour and remove the underline, you can also add:

pointer: default;

They'll still be links, but they'll be no outside indicators that they are.

If you can plumb in an external JavaScript file you can run a routine onload to replace the href value on all links with a particular class, either with an empty string or 'javascript:;'.

julmak

4:10 pm on Aug 26, 2005 (gmt 0)

10+ Year Member



Brilliant! Thank you for your help. The cursor statement was the key!

Here's what I used:
a.SS_JournalHyperLink,
a.SS_JournalHyperLink:hover
{
color:black;
text-decoration:none;
cursor:default
}