...

View Full Version : link diactivation



ds67
07-12-2007, 05:11 AM
Hello to all:

I tried to search for my question, but only 'right-click' disactivation came up. This is NOT my question. What I'm trying to do is have a link act as a link (using underline, color change, etc.) without actually linking to a page. My codes for the appearance of the links work fine. Is this possible? Or should I have the link actually link to somewhere. Any suggestions?

Thanks so much,
DS67

ablaye
07-12-2007, 07:02 AM
Why don't you link to the same page then?

rwedge
07-12-2007, 07:51 AM
You could manipulate the CSS
<span id="faux" style="border-bottom: 1px solid;color: #0000ff;" onmouseover="this.style.color='#ff0000'" onmouseout="this.style.color='#0000ff'">Text</span>or a link
<a href="#" title="" onclick="return false">Text</a>

ds67
07-12-2007, 01:26 PM
Thanks rwedge! the <a href="#" title="" onclick="return false">Text</a> worked perfect. You knew exactly what I was looking for.

Arbitrator
07-12-2007, 10:12 PM
Thanks rwedge! the <a href="#" title="" onclick="return false">Text</a> worked perfect. You knew exactly what I was looking for.Iím pretty sure that ď#Ē is not a valid URI. The problem with this is that the link is broken in situations where JavaScript is missing from the picture and that itís not really a link since it doesnít go anywhere. You also tend to get a meaningless URI in the status bar when hovering over the anchor element.

You can easily style something to look like a hyperlink:


.hyperlink { color: blue; text-decoration: underline; cursor: pointer; }

The main drawbacks are (A) that the link will not be colored according to the userís default link colors and (B) that the author will have to define hover effects in JavaScript due to Internet Explorer 6ís incomplete support for the :hover pseudo‐class. (A) is generally a non‐issue though since, if you define any background colors, then you should be defining link text colors anyway. (B) can be dealt with if you know how to write JavaScript or is a non‐issue if you donít need hover effects or donít need IE6 support.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum