Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Links without underlines using HTML or ?Script

Status
Not open for further replies.

samuelma

MIS
Jun 5, 2001
16
0
0
US
I want to remove the underline from the link with a hover to change the color. I'm "almost" sure I've seen this on a webpage in the past. Is this possible?

I'm not a webdeveloper so I don't have the skill set most of you have. Short Story... My ISP is moving all the webpages to a new server, I want to redesign my webpage. I don't want to have the underline on the links and I want to use the hover for links.

I found a post with the following javascript. Does the "text-decoration:none;" have a modifier that would do this. I'm not even sure where to look for information on this. I'm want to use a black text and have it turn another color.

<code>
<style>
.Link2 a{
text-decoration:none;
}
</style>
<a href=&quot;#&quot; onClick=&quot;return false;&quot; class=&quot;Link2&quot;>the link</a>

<code>
 
Hi,

Use this:

<STYLE TYPE=&quot;text/css&quot;>
.link2 {COLOR: #0000FF; TEXT-DECORATION: none; FONT-FAMILY: Arial; FONT-SIZE : 13px;}
a:link.link2 {color : #0000FF; font-family : Arial; text-decoration : none;}
a:visited.link2 {color : #0000FF; font-family : Arial; text-decoration : none;}
a:hover.link2 {color : #FF0000; font-family : Arial; text-decoration : none;}
</STYLE>

Then use the exact same link as you rhave above:
<a href=&quot;#&quot; onClick=&quot;return false;&quot; class=&quot;Link2&quot;>the link</a>

You can customize whatever you want to in the above CSS, from size to bold, to italics, to color, etc.

Hope this helps! NATE
spyderix.gif

design@spyderix-designz.com
 
Hi again,

Make sure that the class name in the <STYLE> tags matches the class name in the <A CLASS=&quot;&quot;> Make sure that the case is absolutely 100% the same too.

Hope this helps! NATE
spyderix.gif

design@spyderix-designz.com
 
Thank you very much. This works great!
I put the beginning of my webpages up just in case you would like to see what I'm doing with the code.
It's very odd but it's different from all the fancy schmancy webpages I visit daily. Not much content at this time but enough to see that it works.

 
Hi,

A few things about the link you posted.

The HTML tags are incorrect, you have double the amount of most tags. Also the css should be between the HEAD tags. The basic layout of a html page should be as follows:

<HTML>
<HEAD>
<TITLE>YOUR TITLE</TITLE>

ALL YOUR CSS CODE HERE

</HEAD>

<BODY>

CONTENT HERE

</BODY>
</HTML>

Hope this helps Wullie

sales@freshlookdesign.co.uk

 
Hi,
A few more comments about your code:

1. remove those extra tags at the start of your document
<HTML>
<HEAD>
<TITLE></TITLE>

</HEAD>
<BODY>

Follow the template Wullie posted.

2. also as Wullie said the <style> goes between <head> and </head>

3.Clean up your CSS (<style>...)

<style type=&quot;text/css&quot;>
<!--
/* this will be for ALL links */
a:link {color: ; text-decoration: none; }
a:active {color: ; text-decoration: none; }
a:visited {color: ; text-decoration: none; }
a:hover {color: ; text-decoration: none; }

/* this will be specifically for link2, just remember in the link to put <a href=&quot;address&quot; class=&quot;link2&quot;>link2</a>*/
a.link2:link {color: ; text-decoration: none; }
a.link2:active {color: ; text-decoration: none; }
a.link2:visited {color: ; text-decoration: none; }
a.link2:hover {color: ; text-decoration: none; }
-->
</style>

4. for each of your paragraphs use <p>to start a paragraph and </p> to end it. <br>will start the text on a new link.

5. you have onClick=&quot;;&quot; in some of your links, remove these!


Apart from that not a bad start. You will pick it up quickly, its easy enough when you get used to looking at code.
heres some links that will help you


If you want an editor to help you learn you could try
the best on the net IMHO! :)

may the source (code) be with you!



É

endamcg-logo1b.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top