Forum Discussion

bsamson's avatar
bsamson
Adept
11 years ago

Changing color of linked text

Hello!

 

I've added clickable text to a custom page and it is not displaying the same color as other clickable text. Below is my HTML code, where would I add code to change the font color?

 

<b><big><a href="http://glass.stage.lithium.com/t5/custom/page/page-id/US.Events">US Explorer Events Calendar</a>

<b><a href="http://glass.stage.lithium.com/t5/custom/page/page-id/UK.Events">UK Explorer Events Calendar</a>

  • Inheritance issue.  Try changing ".event-link" to ".lia-body .lia-content a.event-link" so your new selector is more specific than the one at the top of the list.

     

    Cheers,

    Tyson

9 Replies

  • Hey bsamson,

     

    if your clickable text should look like all other links within your community pages, I would suggest that you add a class attribute to the <a>-tags and assign them the CSS class definitions from your community css.

     

    You could use a tool like Firebug (for Firefox) to determine the correct CSS class names. :smileyhappy:

     

    Best regards,

    Christian

  • bsamson's avatar
    bsamson
    Adept
    11 years ago

    Hi there,

     

    Thank you for your response! You lost me a little bit on the part about assinging tags. How would this look in css? Could you share an example?

  • bsamson's avatar
    bsamson
    Adept
    11 years ago

    Hi there!

     

    Thanks so much for your help!

     

    I tried out the code below and this was the result. Any idea what I need to fix?

    2014-07-30_1100.png

    <b><big><a class="event-link" href="http://www.glass-community.com/t5/custom/page/page-id/US.Events">US Explorer Events Calendar</a><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <a class="event-link" href="http://www.glass-community.com/t5/custom/page/page-id/UK.Events">UK Explorer Events Calendar</a>

    .event-link { color: #FF69B4; }

  • Tyson's avatar
    Tyson
    Mentor
    11 years ago

    It looks like you added the ".event-link" css selector right into your copy/mark-up after your links.  That should go in your community styles for your skin under the "Community Style" tab in the Studio.  Or, if you were so inclined, you could include it in a <style /> block in your mark-up, though I wouldn't recommend that, except maybe for testing.

     

    Cheers,

    Tyson

  • bsamson's avatar
    bsamson
    Adept
    11 years ago

    Okay, so I aded .event-link { color: #47B7E6;} into Community style and it didn't change the color. Any ideas? Thank you for all of your help!

     

    Here's a screenshot from inspecting the element:

    2014-07-30_1214.png

  • Tyson's avatar
    Tyson
    Mentor
    11 years ago

    Inheritance issue.  Try changing ".event-link" to ".lia-body .lia-content a.event-link" so your new selector is more specific than the one at the top of the list.

     

    Cheers,

    Tyson