Forum How do I...?

Eliminate dark background when link is active

sstanelle
Hi,

I have a simple HTML file with a single link. When viewing the HTML and clicking the link, there is no change in the background color. However, after I run the file through the Prince converter, clicking the link in the resulting PDF shows a black background. Is there a way to achieve the same behavior as the HTML, that is, no change in the background color? I tried setting the CSS background-color to white when the link is active, but that did nothing.

Thanks for any help!

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
a:link {
background-color: white;
}

/* visited link */
a:visited {
background-color: white;
}

/* mouse over link */
a:hover {
background-color: white;
}

/* selected link */
a:active {
background-color: white;
}
</style>
</head>
<body>
<table>
<tr><td>&nbsp;</td></tr>
<tr>
<td>
<a href="http://www.cnn.com">
Clicking this link shows a dark background
</a>
</td>
</tr>
</table>
</body>
</html>
dauwhe
When I click the link in Acrobat, the background color is black.
When I click the link in Preview, the background color is grey.
When I click the link in Safari, the background color is light green.
When I click the link in Chrome, the background color does not change.
When I click the link in Firefox, the background color is light yellow.

In Acrobat, you can edit the "highlight style" of a link to be none rather than "invert," which is the default. I don't know if that's possible to change in Prince.


sstanelle
Thanks! It never occurred to me that it might just be an Acrobat setting.

If anyone knows if there is a way to control this setting with Prince, I'd love to know.
mikeday
We don't have a way to control that yet, I'm not sure what would be the best way to expose the setting through CSS, given that we can't support most of the changes that the :active pseudo-class would allow in HTML. Perhaps we will need a new custom CSS property.