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 11 of 11
  1. #1
    Regular Coder KevinG's Avatar
    Join Date
    Aug 2002
    Location
    The Matrix
    Posts
    405
    Thanks
    3
    Thanked 0 Times in 0 Posts

    defining more than link colour using css?

    i can't define more than one link colour in my global css file. i've tried everything! below is my attempt -


    a.white:hover { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 7.5pt; font-style: normal; font-weight: bold; color: #FFFFFF; text-decoration: underline}
    a.white:visited { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 7.5pt; font-style: normal; font-weight: bold; color: #FFFFFF}
    a.white { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 7.5pt; font-style: normal; font-weight: bold; color: #FFFFFF; text-decoration: none}

    a.red { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; font-style: normal; font-weight: bold; color: #990000}
    a.red:hover { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; font-style: normal; font-weight: bold; color: #990000; text-decoration: underline}
    a.red:visited { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; font-style: normal; font-weight: bold; color: #990000}


    i was sure the above styles would work but noooooooo!

    i'm using DW3 and when i make a new style my CSS selector tool says my new styles are unavailable!

    any ideas anyone?

    (P.S kinda re posted in the appropiate forum)

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, your CSS does work for me..

    <a class="red" href="">red link</a><br>
    <a class="white" href="">white link</a>

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    FL, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try this.

    #Link1 A {text-decoration:none;color:blue;}
    #Link2 A {text-decoration:none;color:red;}

    ____

    <a class="Link1"><a href="Bla">Bla</a></a>
    <a class="Link2"><a href="Bla2">Bla2</a></a>


    This works for me..
    CYWebmaster.com - See why we dot com!!
    ACJavascripts.com - Cut & Paste Javascripts!
    SimplyProgram.com - Personal Blog

  • #4
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Isn't #'s meant for ID's?

    #blah{bladeblah}

    <a href="" id=blah>blahdeblahblah</a>

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    FL, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I gues,, both ways work fine for me
    CYWebmaster.com - See why we dot com!!
    ACJavascripts.com - Cut & Paste Javascripts!
    SimplyProgram.com - Personal Blog

  • #6
    Regular Coder KevinG's Avatar
    Join Date
    Aug 2002
    Location
    The Matrix
    Posts
    405
    Thanks
    3
    Thanked 0 Times in 0 Posts
    but when i make those styles in my global style sheet DW says "red unavailable" "white unavailable" in my css tool?

  • #7
    Regular Coder
    Join Date
    Sep 2002
    Location
    Burlington, VT
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts
    maybe you have already defined them?
    notepad!
    "The focused mind can pierce through stone."
    - Japanese Maxim

  • #8
    Regular Coder KevinG's Avatar
    Join Date
    Aug 2002
    Location
    The Matrix
    Posts
    405
    Thanks
    3
    Thanked 0 Times in 0 Posts
    update.

    i managed to make more than one colour BUT it only makes my links change to that colour - it doesn't make them appear without underline and on click underline. i made three styles link, hover and visited - but my links just appear underlined regardlous.

  • #9
    Regular Coder KevinG's Avatar
    Join Date
    Aug 2002
    Location
    The Matrix
    Posts
    405
    Thanks
    3
    Thanked 0 Times in 0 Posts
    its 1.30am

    i fixed the above problem only my white links underline on mouseover, but my red links don't - even though i followed the same procedure to m ake each style set.

  • #10
    New Coder
    Join Date
    Jul 2002
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You have to sequence them in a particular order or they will not work:


    a.white:link
    a.white:visited
    a.white:hover
    a.white:active

  • #11
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Kevin,

    although it has yielded valuable info (forgot about the specific order, sorry), this is considered cross-posting and is not appreciated.
    Regards,
    Ronald.
    ronaldvanderwijden.com


  •  

    Posting Permissions

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