How do I get links to NOT be underlined ?

J

JD

How do I get links to *not* be underlined, and black instead of blue.

I read this would work by placing it between ,<head> and </head>, but it
doesn't:

<style>
A:link {color: #000000; text-decoration: none}
</style>
 
J

Jukka K. Korpela

JD said:
How do I get links to *not* be underlined, and black instead of blue.

We could tell you, but then we would have to...
I read this would work by placing it between ,<head> and </head>, but
it doesn't:

<style>
A:link {color: #000000; text-decoration: none}
</style>

Well, get your money back then.

Hint: What you are asking for is one of the most common abuses of CSS.
What you had read is half-way successful in creating the damage.

So just stop trying it.
 
L

Larry R Harrison Jr

JD said:
How do I get links to *not* be underlined, and black instead of blue.

I read this would work by placing it between ,<head> and </head>, but it
doesn't:

<style>
A:link {color: #000000; text-decoration: none}
</style>
<style type="text/css">
<!--
a:hover { text-decoration:none; color : #808040;}
-->
</style>

the A:hover line is the key. Also, chance the color # to the one matching
blank (can't remember what it is).

LRH
 
L

Larry R Harrison Jr

I apologize. My method only does this if you hover your mouse over the link.
If you want it to not be underlined at all period, you'd also have this:

A:LINK{ text-decoration : none; color:#000000}

LRH
 
M

Mark Parnell

[Top-posting corrected]
I apologize. My method only does this if you hover your mouse over the link.
If you want it to not be underlined at all period, you'd also have this:

A:LINK{ text-decoration : none; color:#000000}

Which is effectively what the OP already had, except he/she didn't
include the unnecessary cargo-cult HTML comments. You did get one thing
right, though - the OP is missing the required type attribute on the
style element. While IIRC most browsers will default to CSS if no type
is specified, this could be what is causing the problem. Of course,
there could be any number of other factors involved, and as usual a URL
is worth a thousand lines of example code.

BTW: Please don't post upside down.
http://www.allmyfaqs.com/faq.pl?How_to_post
http://en.wikipedia.org/wiki/Top-posting

This will help:
http://home.in.tum.de/~jain/software/oe-quotefix/
 
S

Sid Ismail

On Mon, 9 Aug 2004 01:35:01 -0400, "JD"

: How do I get links to *not* be underlined, and black instead of blue.


What a marvellous way to hide links. Why put it there?

Sid
 
S

SpaceGirl

Sid said:
On Mon, 9 Aug 2004 01:35:01 -0400, "JD"

: How do I get links to *not* be underlined, and black instead of blue.


What a marvellous way to hide links. Why put it there?

Sid

What if it's a menu, and you are swapping the background colour/image in
CSS instead? What if they're not really links, but triggers for JS code?
Etc etc.



--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
S

SpaceGirl

JD said:
How do I get links to *not* be underlined, and black instead of blue.

I read this would work by placing it between ,<head> and </head>, but it
doesn't:

<style>
A:link {color: #000000; text-decoration: none}
</style>

I does work - you must have done something wrong. Post a demo url and
I'll have a look for u.

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
S

Sid Ismail

: JD wrote:
:
: > How do I get links to *not* be underlined, and black instead of blue.
: >
: > I read this would work by placing it between ,<head> and </head>, but it
: > doesn't:
: >
: > <style>
: > A:link {color: #000000; text-decoration: none}
: > </style>
: >
: >
: >
:
: I does work - you must have done something wrong. Post a demo url and
: I'll have a look for u.


He's not getting it when it is a "visited" link. Or active.

Sid
 
S

SpaceGirl

Toby said:
SpaceGirl wrote:




Then why use the <a/> element, which is meant for links?

Does it matter? My point is, just because you dont have a reason doesn't
mean the OP might not have one...

I have a web site that turns <a> tags into blocks, and places a "button"
graphic behind them. When you roll the mouse over the <a> I use a :hover
style to swap that graphic for a different one. Very neat effect -
rollover buttons without ANY script. But it would look bloody awful if
the links were underlined... And as they look like buttons, underlining
is irrelevant.


--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
I

Isofarro

SpaceGirl said:
Sid said:
On Mon, 9 Aug 2004 01:35:01 -0400, "JD"

: How do I get links to *not* be underlined, and black instead of blue.


What a marvellous way to hide links. Why put it there?
[snip]
What if they're not really links, but triggers for JS code?

Get javascript to dynamically insert hooks into the markup, aka Unobtrusive
Javascript
*
<url:http://www.digital-web.com/articles/separating_behavior_and_structure_2/>
* <url:http://www.sitepoint.com/article/structural-markup-javascript>

Events are not limited to anchors, and can be applied to many elements.
 
C

chris

add in style="text-decoration:none" as per below

<a href="[your url here]" style="text-decoration:none">

Isofarro said:
SpaceGirl said:
Sid said:
On Mon, 9 Aug 2004 01:35:01 -0400, "JD"

: How do I get links to *not* be underlined, and black instead of blue.


What a marvellous way to hide links. Why put it there?
[snip]
What if they're not really links, but triggers for JS code?

Get javascript to dynamically insert hooks into the markup, aka Unobtrusive
Javascript
*
<url:http://www.digital-web.com/articles/separating_behavior_and_structure_2
/>
* <url:http://www.sitepoint.com/article/structural-markup-javascript>

Events are not limited to anchors, and can be applied to many elements.

--
Isofarro.
FAQ: http://www.html-faq.com/
Recommended Hosting: http://www.affordablehost.com/
isolani: http://www.isolani.co.uk/blog/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,691
Members
48,796
Latest member
Greg L.

Latest Threads

Top