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; }
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;}
I second this notion (using Confluence cloud edition).The following has no effect:
a { color: hotpink; }
but this does have an effect:
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;}
It looks like you're new here. Sign in or register to get started.