Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Display icon for external links?

Beth Aitman
Contributor
April 8, 2013

Is there any way to display an arrow icon after external links (the way wikipedia does) in Confluence 5.0, to make it clear to users that they're leaving the site? It looks like there used to be, according for the documentation for 3.5, but it doesn't exist any more.

2 answers

1 accepted

1 vote
Answer accepted
David at David Simpson Apps
Atlassian Partner
April 8, 2013

In Confluence Admin | Custom HTML | Add the end of the HEAD, paste:

<style>
a[href^="http://"], a[href^="https://"] {
    background: url(http://bits.wikimedia.org/static-1.22wmf1/skins/vector/images/external-link-ltr-icon.png) center right no-repeat;
    padding-right: 13px;
}
</style>

That should do the trick. Maybe get your own icon though.

Beth Aitman
Contributor
April 8, 2013

Thanks for that! Is it right that this uses the latest version of CSS, so it'll only be supported by the latest browsers though?

David at David Simpson Apps
Atlassian Partner
April 10, 2013

I think this should be good for IE7+

Attribute selectors in CSS have been around for some time now. If youre using Confluence 5, then you'll need a reasonably modern browser: IE8+ or the latest version of the other browsers.

If you like it, mark it as correct ;)

0 votes
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 20, 2018

Updating with working link to arrow image and <style></style> tag applied:

<style>
a[href^="http://"], a[href^="https://"] {
    background: url(https://en.wikipedia.org/w/skins/Vector/images/external-link-ltr-icon.png?325de) center right no-repeat;
    padding-right: 13px;
}
</style>

The link used points directly into Wikipedia sources, so it may become unavailable with no previous notice. Hope this helps someone else who comes across this need!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events