Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Hypertext links

Posted on 1998-08-07
3
Medium Priority
?
189 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 300 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

670 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