Blue hyperlink on darkblue background

Hello there,

I have hyperlinks on my website, but also a dark blue background.
A visited hyperlink will be shown as blue and becomes therefore invisible.
But: I have also hyperlinks on a white background.
How do I change the visited link on the blue background to white with css?

Great if someone can help me on this.