Trying to style a label in mpdf and not working.
Have tried all of the three ways outlined below and none affect how its rendered. Has anyone found a way to style the label field? I understand not all CSS and HTML is supported but it does say it has support for labels.
<label style="color:#eeff00;" for="wf-s1-1" class="field-name">Theme:</label>
<style>
label{
color: #FF2200;
}
label.field-name {
color: #FF2200;
}
.field-name {
color: #FF2200;
}
</style>```
2
Answers
Try using an ID instead of a class as the selector in your CSS:
Label tag is currently not recognized thus not stylable in mPDF.
Feel free to propose a feature request at mPDF issue tracker at github to mitigate this.
See https://mpdf.github.io/css-stylesheets/supported-css.html