Forums

Overriding CSS to prevent links from printing when printing form

nlheath 17 Aug, 2016
I have a CF5 form that displays a table with many links to other form pages. I added a print button, but when the form prints all the links print in parentheses. I found the CSS in my template (Protostar) that needs to be overridden to avoid this, and am trying to do the override using a Load CSS action in my Load Form event, but it doesn't fix the printing problem. The code in my Load CSS is:
@media print {
  a[href]:after {
    content: " " !important;
  }
}

Am I misunderstanding how to use the Load CSS, or is there a problem with the code?
Thanks,
Nancy
GreyHead 17 Aug, 2016
Hi Nancy,

The Load CSS should load your CSS OK. You can check by looking at the page HTML with your browser web developer tools. For testing, if you remove the media the parentheses should be hidden in a normal display.

Bob
This topic is locked and no more replies can be posted.