Forum Discussion

bsamson's avatar
bsamson
Adept
11 years ago

Adding CSS to make clickable text blue

I have created a custom page and added links with HTML. Currently, any clickable text is appearing the same color as non-clickable text. How can I change this to be blue so that it is obvious there is a link? Lithium provided me with the following code to add to the CSS Skins. Any suggestions or advice would be great!

 

.lia-body .lia-content .lia-message-body-content a, .lia-body .lia-content .lia-message-body-content a:link, .lia-body .lia-content .lia-message-body-content a:hover, .lia-body .lia-content .lia-message-body-content a:active, .lia-body .lia-content .lia-message-body-content a:focus, .lia-body .lia-content .lia-message-body-content a:visited{ color: #47B7E6;}

#lia-body .lia-content .lia-message-unread a { font-weight: bold; color: #47B7E6;}

 

  • Inactive User's avatar
    Inactive User

    That code sets all links no matter the state (hover, active, visited, etc) to the same color. You'd want to set the :visited link to a new color. ie.

     

    .lia-body .lia-content .lia-message-body-content a, 
    .lia-body .lia-content .lia-message-body-content a:link,
    .lia-body .lia-content .lia-message-body-content a:hover,
    .lia-body .lia-content .lia-message-body-content a:active,
    .lia-body .lia-content .lia-message-body-content a:focus,
    .lia-body .lia-content .lia-message-body-content a:visited{ color: #47B7E6;} .lia-body .lia-content .lia-message-body-content a:visited{ color: blue;}

    To clarify, the second line overrides the style in the first declaration. You could just not include that selector in the first declaration for improved performance/simplicity.

     

    .lia-body .lia-content .lia-message-body-content a, 
    .lia-body .lia-content .lia-message-body-content a:link,
    .lia-body .lia-content .lia-message-body-content a:hover,
    .lia-body .lia-content .lia-message-body-content a:active,
    .lia-body .lia-content .lia-message-body-content a:focus{ color: #47B7E6;} .lia-body .lia-content .lia-message-body-content a:visited{ color: blue;}

     

    • bsamson's avatar
      bsamson
      Adept

      Thank you for your reply! 

       

      I believe I would want to use the second section of code you shared. Where would I put this in Studio?

      • Inactive User's avatar
        Inactive User

        You'd put it in your skin's CSS. In Studio, that's underneath the 'Community Style' tab. Click the 'CSS' tab and then expand your skin from the list on the right and click 'Desktop'. Put it in the editor.

         

        I think there's a Lithium Tutorial out there. A Lithium person is going to have to provide a link to that though. I don't have it offhand.