Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Text decoration

Reply
Thread Tools

Text decoration

 
 
Desmond
Guest
Posts: n/a
 
      08-25-2004
I have a style sheet which has the following line.

A:link, A:visited, A:active { text-decoration: none }

However one one page I am using a menu of links. This causes my font
class to be over ridden with blue text the default used for links.
I don't want to change the stylesheet here.
I need to change the line in the webpage to stop the link from changing my font
blue. The line is.

<tr><td class="Menu"><a href="Recipe4.html">Potatoes & Cauliflower in a spicy
sauce</A></td></tr>

I can only show a piece of my webpage as I do not have access to a server to
display it. I hope
this is sufficient.

Desmond.

 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      08-25-2004
(Desmond) wrote:

> I have a style sheet which has the following line.
>
> A:link, A:visited, A:active { text-decoration: none }


Remove it. Using
:hover { text-decoration: none; }
might make sense, since when the cursor is moved over a link, the
underline has probably done its job and can be temporarily removed to
improve legibility a little.

> However one one page I am using a menu of links. This causes my font
> class to be over ridden with blue text the default used for links.
> I don't want to change the stylesheet here.


I cannot decipher what you are talking about. The Subject says "Text
decoration". _Are_ you talking about it, or something else?

> I need to change the line in the webpage to stop the link from
> changing my font blue.


No you don't.

> The line is.
>
> <tr><td class="Menu"><a href="Recipe4.html">Potatoes & Cauliflower in
> a spicy sauce</A></td></tr>


It should probably be <ul> (or, if you prefer, <menu> ), but otherwise
it's fine. Well, it would be safer to entify "&" as "&amp;". A nice link.
Why prevent it from looking like a link?

> I can only show a piece of my webpage as I do not have access to a
> server to display it.


Then get some access. You'll need it anyway.

> I hope this is sufficient.


It isn't.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
 
 
 
J.R.
Guest
Posts: n/a
 
      08-25-2004
I know exactly what you're talking about, took a little while to figure it
out, but:

Try this:

..Menu A:link {text-decoration: none;}
..Menu A:active {text-decoration: none;}
..Menu A:visited {text-decoration: none;}
..Menu A:hover {text-decoration: none;}

wherever you stick your CSS.

J.R.


 
Reply With Quote
 
Neal
Guest
Posts: n/a
 
      08-25-2004
On 25 Aug 2004 09:17:38 GMT, Desmond <> wrote:

> I have a style sheet which has the following line.
>
> A:link, A:visited, A:active { text-decoration: none }


I assume you've ensured each link is otherwise clearly identifiable as a
link, without hovering or color cues? How will I know where to click, or
even if to click?

As underlining *means* link to most users, the above type of styling
should only be done with extreme caution, if at all.
 
Reply With Quote
 
Desmond
Guest
Posts: n/a
 
      08-25-2004
Sorry if i was not clear here.

If i have a link to a webpage. I will be using an anchor
<a> this is held within a <td> tag. The Tag has a class
<td Class="Myfont">

Within the <td> </td> I don't want the <a></a>
to change my font class which is Red to blue because it
it is an <a></a>

what i mean is

<tr><td class="Menu"

/* this font is grey and must be grey and not turned into blue because it has
<a></a>
following it */


><a href="Recipe4.html">Potatoes & Cauliflower in a spicy sauce</A></td></tr>

 
Reply With Quote
 
Desmond
Guest
Posts: n/a
 
      08-25-2004
this will not work

I know exactly what you're talking about, took a little while to figure it
out, but:

Try this:

..Menu A:link {text-decoration: none;}
..Menu A:active {text-decoration: none;}
..Menu A:visited {text-decoration: none;}
..Menu A:hover {text-decoration: none;}

Because this affects all pages used on the website. If I
want someone to contact me I wan't my e-mail address to be
blue. Therefore this has to be a change for one web page only.


 
Reply With Quote
 
Neal
Guest
Posts: n/a
 
      08-25-2004
On 25 Aug 2004 21:30:37 GMT, Desmond <> wrote:

> Sorry if i was not clear here.
>
> If i have a link to a webpage. I will be using an anchor
> <a> this is held within a <td> tag. The Tag has a class
> <td Class="Myfont">
>
> Within the <td> </td> I don't want the <a></a>
> to change my font class which is Red to blue because it
> it is an <a></a>
>
> what i mean is
>
> <tr><td class="Menu"
>
> /* this font is grey and must be grey and not turned into blue because
> it has
> <a></a>
> following it */
>
>
>> <a href="Recipe4.html">Potatoes & Cauliflower in a spicy
>> sauce</A></td></tr>


Easy. Set the no-link style for .Menu, then set the link style if
necessary for the anchor.

..Menu {color: #777;}

Then, later, if you like:

..Menu a:link {color: blue;}
..Menu a:visited {color: purple}

But this will default to link colors anyhow, unless you changed it.
 
Reply With Quote
 
Neal
Guest
Posts: n/a
 
      08-25-2004
On 25 Aug 2004 21:34:34 GMT, Desmond <> wrote:

> this will not work
>
> I know exactly what you're talking about, took a little while to figure
> it
> out, but:
>
> Try this:
>
> .Menu A:link {text-decoration: none;}
> .Menu A:active {text-decoration: none;}
> .Menu A:visited {text-decoration: none;}
> .Menu A:hover {text-decoration: none;}
>
> Because this affects all pages used on the website. If I
> want someone to contact me I wan't my e-mail address to be
> blue. Therefore this has to be a change for one web page only.
>
>

Only anchors within an element classed as "Menu" will be affected. Simply
don't class, or class differently, any anchors not to be styled like this.
 
Reply With Quote
 
Desmond
Guest
Posts: n/a
 
      08-25-2004
can I not have on one unique webpage something like the following

<td class="Menu">
<a href="Recipe4.html" KEEP MY FONT CLASS="class="menu" font colour grey">

Potatoes & Cauliflower in a spicy sauce
</A>
</td>
 
Reply With Quote
 
Neal
Guest
Posts: n/a
 
      08-25-2004
On 25 Aug 2004 21:47:57 GMT, Desmond <> wrote:

> can I not have on one unique webpage something like the following
>
> <td class="Menu">
> <a href="Recipe4.html" KEEP MY FONT CLASS="class="menu" font colour
> grey">
>
> Potatoes & Cauliflower in a spicy sauce
> </A>
> </td>



Desmond, either you have replied to yourself, or your posts are not
threading properly. Please quote for context!

If it's for one and only one page, and no other page will ever use it, you
could do it in the style element in the head. Or, link to or import a
different or additional stylesheet. Or, choose a unique style name and put
it in the stylesheet, which I find simplest.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
text-decoration on part of a link Tim Streater HTML 24 09-27-2011 12:36 AM
A text decoration question Old HTML Slinger HTML 24 08-26-2006 02:13 PM
Style="text-decoration: line-through" Klaas ASP .Net 1 08-06-2006 01:10 PM
Style="text-decoration: line-through" Klaas ASP .Net Web Controls 1 08-06-2006 01:10 PM
{text-decoration: none} Broken Paul Furman HTML 11 02-15-2004 11:18 PM



Advertisments