|
-
Oct 3rd, 2002, 08:55 AM
#1
Thread Starter
Addicted Member
Links in HTML
Simple one - hopefully.
Anyone tell me how to create hyperlinks in HTML which do not get underlined as standard?
I want www.mywebpage.com to be without underline.
Simple ya? Hope so.
Thanks
HD
-
Oct 3rd, 2002, 09:03 AM
#2
Frenzied Member
Re: Links in HTML
Originally posted by HairyDave
I want www.mywebpage.com to be without underline.
with CSS:
Code:
<a href="http://www.mywebpage.com" style="text-decoration:none;">www.mywebpage.com</a>
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Oct 3rd, 2002, 09:06 AM
#3
Thread Starter
Addicted Member
-
Oct 3rd, 2002, 09:18 AM
#4
Frenzied Member
You could also create a class for that if you want to use it on multiple links:
Code:
<head>
<style type="text/css"><!--
a.noU { text-decoration: none; }
--></style>
</head>
<body>
<a href="#" class="noU">asd</a>
-
Oct 3rd, 2002, 04:20 PM
#5
Junior Member
Originally posted by Rick Bull
You could also create a class for that if you want to use it on multiple links:
Code:
<head>
<style type="text/css"><!--
a.noU { text-decoration: none; }
--></style>
</head>
<body>
<a href="#" class="noU">asd</a>
sorry can expline this
with a real example
thinks
-
Oct 3rd, 2002, 04:25 PM
#6
Frenzied Member
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<head>
<style type="text/css"><!--
a.noU { text-decoration: none; }
--></style>
</head>
<body>
<a href="#" class="noU">link1</a>
<a href="#" class="noU">link2</a>
<a href="#" >link3</a>
</body>
</HTML>
How much do you need explained? I'm going to assume you understood my post with the "inline" style. When you put the style in the head as shown you can assign it to a class and give it to multiple elements. So, if you notice in the example I have two links set to that class... they will not have the text decoration but the third link which has no class (pun not intended ) will be underlined. "a.noU" is two parts the a means "apply this to all a tags (links) that are of class "noU"
hope that helps, if not just post 
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Oct 4th, 2002, 10:48 AM
#7
Thread Starter
Addicted Member
Cheers for that - don't suppose you could tell me how to get a link to change colour when the mouse hovers above the link? I know you can declare javaScript for the onMouseOver - is this the way to do it?
If so, could you give a very simple example of it - and if not what is the way?
Thanks very much
HD
-
Oct 4th, 2002, 10:50 AM
#8
Frenzied Member
Code:
.catlink {color: #000000;}
.catlink:hover {color: #ffffff;}

Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Oct 4th, 2002, 11:11 AM
#9
Thread Starter
Addicted Member
Sorry to be so dense, how does this fit in with the example you gave before. I have tried this:
Code:
<head>
<style type="text/css"><!--
a.noU { text-decoration: none; }
a.catlink {color: #000000;}
a.catlink:hover {color: #ffffff;}
--></style>
</head>
Is this right? I don't seem to be able to get the link to change colour.
Any help would be gratefully received.
HD
-
Oct 4th, 2002, 11:16 AM
#10
Frenzied Member
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<head>
<style type="text/css"><!--
a.noU { text-decoration: none; }
a.catlink {color: #000000;}
a.catlink:hover {color: #ffffff;}
--></style>
</head>
<body>
<a href="#" class="noU">link1</a>
<a href="#" class="noU">link2</a>
<a href="#" class="catlink">link3</a>
</body>
</HTML>
will cause link 3 to have the rollovers but I assume that you want the underline & rolover on the same link:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<head>
<style type="text/css"><!--
a.noU { text-decoration: none; color: #000000;}
a.noU:hover { text-decoration: none; color: #ffffff;}
--></style>
</head>
<body>
<a href="#" class="noU">link1</a>
<a href="#" class="noU">link2</a>
<a href="#" >link3</a>
</body>
</HTML>
no need for appoligies... only way to learn is to ask and I was quite obsure in my post 
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Oct 4th, 2002, 11:20 AM
#11
Thread Starter
Addicted Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|