Text decoration

Discussion in 'HTML' started by Desmond, Aug 25, 2004.

  1. Desmond

    Desmond Guest

    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.
     
    Desmond, Aug 25, 2004
    #1
    1. Advertising

  2. (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
     
    Jukka K. Korpela, Aug 25, 2004
    #2
    1. Advertising

  3. Desmond

    J.R. Guest

    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.
     
    J.R., Aug 25, 2004
    #3
  4. Desmond

    Neal Guest

    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.
     
    Neal, Aug 25, 2004
    #4
  5. Desmond

    Desmond Guest

    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>
     
    Desmond, Aug 25, 2004
    #5
  6. Desmond

    Desmond Guest

    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.
     
    Desmond, Aug 25, 2004
    #6
  7. Desmond

    Neal Guest

    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.
     
    Neal, Aug 25, 2004
    #7
  8. Desmond

    Neal Guest

    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.
     
    Neal, Aug 25, 2004
    #8
  9. Desmond

    Desmond Guest

    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, Aug 25, 2004
    #9
  10. Desmond

    Neal Guest

    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.
     
    Neal, Aug 25, 2004
    #10
  11. Desmond

    Mark Parnell Guest

    Mark Parnell, Aug 25, 2004
    #11
  12. Desmond

    Matt Clara Guest

    "Desmond" <> wrote in message
    news:...
    > 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?

    --
    Regards,
    Matt Clara
    www.mattclara.com
     
    Matt Clara, Aug 26, 2004
    #12
  13. Desmond

    Desmond Guest

    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.
     
    Desmond, Aug 26, 2004
    #13
  14. Desmond

    Desmond Guest

    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'
    }
     
    Desmond, Aug 26, 2004
    #14
  15. Desmond

    Desmond Guest

    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.
     
    Desmond, Aug 26, 2004
    #15
  16. Desmond

    Kris Guest

    In article <>,
    (Desmond) wrote:

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


    You may want to read (and argue with) this:
    <http://www.useit.com/alertbox/20040510.html>

    --
    Kris
    <> (nl)
     
    Kris, Aug 26, 2004
    #16
  17. On 26 Aug 2004 10:12:42 GMT, Desmond <> wrote:

    [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

    --
    Michael Winter
    Replace ".invalid" with ".uk" to reply by e-mail.
     
    Michael Winter, Aug 26, 2004
    #17
  18. Desmond

    Karl Groves Guest

    "Desmond" <> wrote in message
    news:...
    > 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.
    >


    You're a moron.

    -Karl
     
    Karl Groves, Aug 26, 2004
    #18
  19. Desmond

    Desmond Guest

    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;}
     
    Desmond, Aug 26, 2004
    #19
  20. Desmond

    Chris Morris Guest

    (Desmond) writes:
    > 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.

    > FONT-FAMILY: Arial;}


    --
    Chris
     
    Chris Morris, Aug 26, 2004
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Furman

    {text-decoration: none} Broken

    Paul Furman, Feb 14, 2004, in forum: HTML
    Replies:
    11
    Views:
    784
    Mark Parnell
    Feb 15, 2004
  2. Klaas
    Replies:
    1
    Views:
    727
    Alessandro Zifiglio
    Aug 6, 2006
  3. Old HTML Slinger

    A text decoration question

    Old HTML Slinger, Aug 22, 2006, in forum: HTML
    Replies:
    24
    Views:
    2,645
    Jonathan N. Little
    Aug 26, 2006
  4. Tim Streater

    text-decoration on part of a link

    Tim Streater, Sep 16, 2011, in forum: HTML
    Replies:
    24
    Views:
    1,595
    dorayme
    Sep 27, 2011
  5. Klaas

    Style="text-decoration: line-through"

    Klaas, Aug 6, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    174
    Alessandro Zifiglio
    Aug 6, 2006
Loading...

Share This Page