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 6 of 6
  1. #1
    New Coder
    Join Date
    Jan 2003
    Location
    1st floor, 3rd door on the right side
    Posts
    77
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question selective hyperlink styles

    Hi !

    I try to change the color of my hyperlinks using for example
    a:link {color: #FF0000}
    a:visited {color: #00FF00}
    a:hover {color: #FF00FF}
    a:active {color: #0000FF}
    So far no prob.

    But I only want to have that in my contents. Is this possible to define this within the paragraph definition I have anyway (links would take these colors in paragraphs)?

    <style type="text/css">
    p
    {
    font-family: arial;
    font-size: 11px;
    margin-left: 20px;
    margin-right: 20px
    }
    </style>

    Tks for the help in advance
    Fred

    Oh man, I guess i've been to many hours on this this week-end...
    http://www.geocities.com/verybadpage/page3.html

  • #2
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i cant think of a way off the top of my head, but you could assign a class to a link.

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    183
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Wrap your contents in <div class="contents"></div>

    and then use this:


    .contents a:link {color: #FF0000}
    .contents a:visited {color: #00FF00}
    .contents a:hover {color: #FF00FF}
    .contents a:active {color: #0000FF}
    Offtone.com - In the works...

  • #4
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    class="" will go into <p> also if thats what you wanted to use.

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #5
    New Coder
    Join Date
    Jan 2003
    Location
    1st floor, 3rd door on the right side
    Posts
    77
    Thanks
    1
    Thanked 0 Times in 0 Posts

    cool ...

    Ok, it helps me further, thanks to all
    .
    What is if I want to assign a class to links? I have tried this way without success:

    <html>
    <head>

    <style type="text/css">
    .mmm a:link {color: #FF0000}
    .mmm a:visited {color: #00FF00}
    .mmm a:hover {color: #FF00FF}
    .mmm a:active {color: #0000FF}
    </style>

    </head>

    <body>

    <a href="default.asp" target="_blank" class="mmm">This is a link</a>

    </body>
    </html>

    Cheers - Fred

  • #6
    jtr
    jtr is offline
    New Coder
    Join Date
    Jun 2002
    Location
    Northern California
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <style type="text/css">
    A.mmm:link {color: #FF0000;}
    A.mmm:visited {color: #00FF00;}
    A.mmm:hover {color: #FF00FF;}
    A.mmm:active {color: #0000FF;}
    </style>


  •  

    Posting Permissions

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