Text decoration

D

Desmond

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.
 
J

Jukka K. Korpela

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.
 
J

J.R.

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.
 
N

Neal

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.
 
D

Desmond

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 */
 
D

Desmond

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.
 
N

Neal

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 */

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.
 
N

Neal

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.
 
D

Desmond

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>
 
N

Neal

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.
 
M

Matt Clara

Desmond said:
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.

What style does TD Class="Menu" refer to?
 
D

Desmond

This was sugested. Choose a unique style name and put
it in the stylesheet, which I find simplest.

Ok this is probably what I am after.
In my style shhet I have the following

..Menu
{
FONT-SIZE: 14pt;
COLOR: green;
FONT-FAMILY: 'Arial'
}

This font calls for the font to be green. But on one page I am using this font
style
as a menu linking to other recipie pages. I would like on this page for the
font
to stay green and not blue because my browser see's that it is a link and MUST
be BLUE.
If i can create a unigue font style that whould force the browser to display
Green instead of blue I whould be happy.

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



Choose a unique style name and put
it in the stylesheet, which I find simplest.
 
D

Desmond

What style does TD Class="Menu" refer to?

It refers to myStylesheet.css
and the following entry

..Menu
{
FONT-SIZE: 14pt;
COLOR: green;
FONT-FAMILY: 'Arial'
}
 
D

Desmond

Links Want To Be Links:
http://www.cs.tut.fi/~jkorpela/www/links.html

No they Don't. If you went to a top restaurant and
looked at the menu. You would not expect all the
items on a menu to be blue and underlined. so
why does my menu on a webpage have to be blue and
underlined. Links do not always have to llok like links.
 
M

Michael Winter

[snip]
This font calls for the font to be green. But on one page I am using
this font style as a menu linking to other recipie pages. I would like
on this page for the font to stay green and not blue because my browser
see's that it is a link and MUST be BLUE.

This is the issue: the browser overrides cascaded link styles. They must
be explictly set.

With a well-behaved browser, you could write:

.Menu a {
color: inherit;
}

Simple. Links would inherit their parent's colour (green). IE, being the
other kind of browser doesn't like this, and requires you to be more
specific. So, try:

.Menu,
.Menu a {
FONT-SIZE: 14pt;
COLOR: green;
FONT-FAMILY: Arial;
}

Except, the font size should be in percent or em, and if you specify the
font family, you should include a generic type (sans-serif, in this case).

[snip]

Mike
 
D

Desmond

Thanks for all thouse who helped on this
the following works fine and gets me out of the problem.

..Menu
a {
FONT-SIZE: 12pt;
COLOR: green;
FONT-FAMILY: Arial;}
 
C

Chris Morris

Thanks for all thouse who helped on this
the following works fine and gets me out of the problem.

.Menu
a {
FONT-SIZE: 12pt;

You've probably already had the relative font sizes pointers given to you.
COLOR: green;

You should specify a background colour as well, or you can have
interesting problems when the user's browser *isn't* set to black text
on a white background as its default.
 

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
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top