Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Oct 2002
    Location
    USA
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Text Decoration Exception

    When I use the script:

    <style type="text/css">
    a:link{
    text-decoration: none;
    }
    a:visited{
    text-decoration:none;
    }
    </style>

    it removes all the underlines on the links.

    However, there are a few that I would like to leave underlined.

    What should I do?

    Thanks!

  • #2
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    a:active {
    text-decoration: none;
    }
    a:hover {
    text-decoration: none;
    }

    You can actually compress the whole thing down into:

    a:link, a:visited, a:active, a:hover {
    text-decoration: none}
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #3
    Regular Coder
    Join Date
    Oct 2002
    Location
    USA
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts
    and as for the solution to my problem?

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Posts
    676
    Thanks
    1
    Thanked 0 Times in 0 Posts
    sss...

    "quote...However, there are a few that I would like to leave underlined...endquote"

    you havvve to just a ssign® 'different' classes to the links...n' thennn when you 'insert' the link??? you just a pply® the 'class' thattt controls it...

    Code:
    <style type="text/css">
    <!--
    a.other:link {text-decoration: none;}
    -->
    </style>
    n' thennn tis just a used® like this...

    <a href="http://www.domain.com/" class="other">yadda</a>

  • #5
    Regular Coder
    Join Date
    Oct 2002
    Location
    USA
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I did the following and specified the class as other.

    Everything is as it should except for the "other". It is not always underlined. What should I do? thanks.

    <style type="text/css">
    a:link{
    text-decoration: none;
    }
    a:visited{
    text-decoration: none;
    }
    a:hover{
    text-decoration: underline;
    }
    ather{
    text-decoration: underline;
    }
    </style>

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Posts
    676
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Originally posted by ssskaya
    I did the following and specified the class as other

    .ather{
    text-decoration: underline;
    }
    </style>
    sss...
    ummm nope ya just a didnt®...
    try this...
    Code:
    a.other:link {text-decoration: none;}

  • #7
    Regular Coder
    Join Date
    Oct 2002
    Location
    USA
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts
    yes I got it.

    but one more thing:

    the links to my .oho pages do not work.

    is it possible that this is not compatible with php links?

    please let me know.

    thanks!

  • #8
    Regular Coder
    Join Date
    Jun 2002
    Posts
    676
    Thanks
    1
    Thanked 0 Times in 0 Posts
    sss...
    "quote...is it possible that this is not compatible with php links?...endquote"

    just a sorry®.../me doesnt do/know php...
    'cept donnnt giveup...one of the pros will just a know® how to do n' more than likely just a guide® ya as to howww the code would have to be modified...


    just a ps®.../me just a searched® on google for...
    define link classes php

    n' just a found® this...

    http://www.phpbuilder.com/columns/rod19990601.php3
    Last edited by justame; 11-03-2003 at 02:02 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •