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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great. If it worked, mark it as answered ;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.