Solved

Hypertext links

Posted on 1998-08-07
3
181 Views
Last Modified: 2010-04-09
Is it possible to turn a line of text into a hyperlink and for it not to change colour or become underlined?
I know that I could use a bitmap instead (with the border turned off) but would prefer to keep it as plain text.

Thanks
0
Comment
Question by:Caralinus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Accepted Solution

by:
jbirk earned 100 total points
ID: 1845107
Yes, you can!  Except that it was an added feature in the 4.0 browsers.  It's an ability enabled by CSS.
To do just one link like that, you would do it this way:
<A HREF="somewhere.html" style="text-decoration: none; color: black">Click here</A>
Of course, the color would be whatever the color of your text is.

And then if you wanted to make all the links that way you would do this:
<STYLE>
<! --  Hide code from older browsers.
  A:link {color: black;  text-decoration: none}
  A:visited {color: black; text-decoration: none}
 -->
</STYLE>

Enjoy!
Josh
0
 
LVL 28

Expert Comment

by:sybe
ID: 1845108
In version 3 browser the color can only be set when the textlink is in a table (it's crazy but true), the underlining can't be removed.

<table>
<tr>
<td>
<a href="anotherpage.htm"><font color="#000000">click here</font></a>
</td>
</tr>
</table>
0
 
LVL 2

Expert Comment

by:Quixote
ID: 1845109
sybe-

That doesn't work *outside* a table?!?!  I never thought to check that compatibility.

I'd like to point out the usefulness of combining the two above suggestions:


<table><tr><td>

<a href="anotherpage.htm"
   style="text-decoration: none; color: black"><font color="#000000">click here</font></a>

</td></tr></table>


Code like this will give you the following results:

Netscape 2:  link color and underlined
Netscape 3:  black and underlined
Explorer 3:  black and no underline
Netscape 4:  black and no underline
Explorer 4:  black and no underline

So, that's pretty close.  Jbirk's comments about CSS only in version 4 browsers is mostly true:  IE3's partial implementation of JavaScript (JScript) and CSS allow for some tricks to work on more browsers, but IMHO was not worth it for the headaches they have caused.  However, this is one case where it works just dandy.

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SVG and IE11 2 34
Html split(text) 2 49
How do I update select listbox after search 2 50
Phone number mask 4 10
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question