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

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?


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 */ a[href*="//"]:not([href*=""]) { 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
Community showcase
Published in Confluence

Confluence Mythbusters: Does Atlassian even use Confluence?

Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...

1,774 views 8 32
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