Announcement

Collapse
No announcement yet.

More than one link color?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

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



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

    ArtBeast!

    Comment


    • #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


      • #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


        • #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


          • #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


            • #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...
              X