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 do I change the link color in the pdf export?

I am tying to set up a pdf stylesheet and want to change the color of hyperlinks to red. I have added the code below to the stylesheet but it has no effect. How can I change the hyperlink color.

.wiki-content a, .wiki-content a:link, .wiki-content a:visited, .wiki-content a:focus, .wiki-content a:hover, .wiki-content a:active {
color: #D21034!important;
}

2 answers

1 accepted

Try something simpler, e.g.

 

a {
    color: hotpink !important;
}

Likely the wrapping div.wiki-content is omitted from the PDF view.

Edit: Added the !important override for support in Confluence Cloud PDF exports

Thanks David - this worked.

Great. If it worked, mark it as answered ;)

I couldn't get the colour to change to anything other than the default black. I was able to add some text decoration to at least underline the hyperlinks though:

a {
text-decoration: underline;
}
w.oosting I'm New Here Sep 18, 2020

I second this notion (using Confluence cloud edition).

The following has no effect:

a
{
    color: hotpink;
}

but this does have an effect:

a {
text-decoration: underline;
}

It feels like a Confluence bug in the interpretation of the CSS style sheet and/or that color specifically is overruled somewhere later in the process.

It looks indeed like the color is set somewhere else, but adding `!important` will make the declaration stick. In other words, this works:

a {
color: hotpink !important;
}

Suggest an answer

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

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

75 views 0 3
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