2) I am generating a view on a page and in the view I am embedding the pdf download link in the view as per:
[e2pdf-download id="2" dataset="[id]" ]
This works great but I need to style up the download link and make it look like a button and give it a larger clickable area. I have reviewed the documentation and tried to add additional css classes to change the text colour but that doesn't seem to work, the css classes that e2pdf generates seem to override my attempts.
3) I have tried a few ways to style up the link, this one works EXCEPT the colour of the text remains red, I cannot change it to white or another colour:
Note, in the example I am not using an additional css class (did not work earlier) i tried inlining a style (obviously not supported according to docs) and wrapping the output in a <p> tag. Those don't work.
4) In addition, when the DOWNLOAD link is generated additional <br> and <p> tags are added which mess with the layout as I am trying to emulate a button. For example, here is what is rendered out for the code in the previous point:
QUESTION #1: How do I override the class="e2pdf-download e2pdf-format-pdf" styles in a sane way? I need white text specifically but if I can actually access a css class as per docs that would work better.
QUESTION #2: How do I stop the addictional <br> and <p> tags from being generated to control the layout a little better?
NOTES: I can provide access to test site if required.
Thank you for your help!
31 January, 2022 23:18:42
#1. E2Pdf doesn't add any styles by default to generated links. The style which you see is applied by your theme or built-in CSS in browser which has more priority on your code.
This code below:
- is incorrect as you apply CSS to the text inside "span" and not "a" tag...
- "style" is not correct attribute. It can be used only class="additional_class"...
It must be added via editing the source of "View" ("Text") + you need keep attention on quotes. It must be used "single" quotes inside shortcode and "double" quotes over href attribute (Screenshot attached).
#2. E2Pdf doesn't generate any "p" or "br" tags. It's generated by your theme or wysiwyg editor of view so try to review the source of Formidable Forms View and remove any spaces and new lines over added shortcode...