More than one link color?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    More than one link color?

    Is it possible to set more than one link color? I'm working on a design that has links on both light and dark backgrounds and I would like a way to specify different link colors rather than have one link color for the entire page.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


  • Menno
    Senior Member
    • Apr 2000
    • 1224

    #2
    you should look into "css"
    - Insert viable disclaimer here -

    ArtBeast!

    Comment

    • Jordan
      Senior Member
      • Feb 2001
      • 278

      #3
      For example use this CSS code:

      Code:
      <style type="text/css">
      <!--
      A:link{text-decoration: underline; color: #000000;}
      A:visited{text-decoration: underline; color: #000000;}
      A:active{text-decoration: underline; color: #000000;}
      A:hover{text-decoration: none; color: #000000; }
      
      A:link.bmen{text-decoration: underline; color: #FFFFFF;}
      A:visited.bmen{text-decoration: underline; color: #FFFFFF;}
      A:active.bmen{text-decoration: underline; color: #FFFFFF;}
      A:hover.bmen{text-decoration: none; color: #FFFFFF; }
      -->
      </style>
      Then use this HTML code for the links with the white color:

      Code:
      <a href="somewhere.php" class="bmen">Somewhere</a>
      And this color for the black link:

      Code:
      <a href="hello.php">hello</a>
      Just remember that the second link color will not show up in Netscape, it will default back to the primary link color (black in this case).
      Jordan Gadd
      Contact Information

      Comment

      • Steve Machol
        Former Customer Support Manager
        • Jul 2000
        • 154488

        #4
        Thanks Jordan! I didn't realize this capability in CSS.

        However I was hoping for a way to do this across browsers. Like it or not some of us still have significant numbers of members who use Netscape and I'd rather not make additions that make the board more difficult for them to use. I guess I'll just have to restrict my color scheme.
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment

        • OneChance
          Member
          • Feb 2001
          • 64

          #5
          This works in Netscape 4.x/6 and IE 4.x/5.x:
          Code:
          <style type="text/css"><!--
            a:link    { color: #000000; }
            a:visited { color: #000000; }
            a:hover   { color: #000000; }
            a:active  { color: #000000; }
          
            a.bmen:link    { color: #FFFFFF; }
            a.bmen:visited { color: #FFFFFF; }
            a.bmen:hover   { color: #FFFFFF; }
            a.bmen:active  { color: #FFFFFF; }
          --></style>

          Comment

          • Steve Machol
            Former Customer Support Manager
            • Jul 2000
            • 154488

            #6
            OneChance.

            Very nice! I'll check it out and report back. Thanks!
            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
            Change CKEditor Colors to Match Style (for 4.1.4 and above)

            Steve Machol Photography


            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


            Comment

            • doron
              Senior Member
              • Apr 2000
              • 669

              #7
              OneChance's code is teh correct way

              tagname.classname:attribute

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...