Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How can I edit my Stylesheet so that only my external links appear as blue and underscored? Edited

Our wiki has a style applied that makes every link (both internal confluence page links and external links) to be red with no underscore. I'd like to retain this except for external links, which I want to appear as blue with an underscore. I currently have this applied to my stylesheet:

.wiki-content a { text-decoration:underline !important; color:blue !important; }  

 

However, the "!important" overrides all of my links. I only want this change to apply to specific links in my space, the external links. Is this possible? If so, how should I edit the above?

Thank you!

1 answer

1 accepted

1 vote
Answer accepted
Brant Schroeder Community Leader Mar 03, 2021

You should be able to do something like this

/* add this to css and add your sites url and remove mysite.com */ a[href*="//"]:not([href*="mysite.com"]) { text-decoration:underline !important; color:blue !important; }

Thank you! Here is what I ended up doing, it's probably a little convoluted but it worked:

 

/* Global change override - Changes internal links back to red without underscore */  
.wiki-content a[href*="/display/"] { color: #A52A2A !important; text-decoration:none !important}   

  

/* Global change override - Changes internal links back to red without underscore */  
.wiki-content a[href*="pages/"] { color: #A52A2A !important; text-decoration:none !important}   

  

/* Global change override - Changes Table of Contents back to red without underscore */
.wiki-content a[class*="toc-link"] { color: #A52A2A !important; text-decoration:none !important}   

  

/* Global change override - Changes user mention background color so that it is readable */
.wiki-content a.user-mention.current-user-mention { background-color: #87CEFA !important; }   

  

/* Global change so that all links are blue with an underscore */  
.wiki-content a { text-decoration:underline !important; color:blue !important; }  

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence Cloud

Introducing Confluence Cloud for Microsoft Teams (Available for Preview!)

Hi Atlassian Community, Remote work has shifted how teams collaborate, and we’ve heard from many of you that Microsoft Teams has become mission critical to many of your workflows, from how you chat...

2,537 views 21 21
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you