0

I have below code where I need a rectangular box with text in white inside it. Box shows fine but text fails to read color #FFFFFF. Can someone please help?

<div id="rectangle" style="width:1300px; height:50px; background-color:black" >  <center><font size="4" color="#FFFFFF">  <br> ATTENTION PRACTITIONER : PLEASE FILL IN ALL BLANK FIELDS TO ENSURE TIMELY DELIVERY </br> </font></center></div>
2

You can write your css style inside the style tag which is wrapped inside an HTML tag, and also make sure your "applyBodyTag="false"" is set in your apex:page.

<apex:page renderAs="pdf"  applyBodyTag="false" >
    <head>
        <style>
            .tempName{ color: red; } 

        </style>
    </head>
  <div id="rectangle" style="width:1300px; height:50px; background-color:black" >  <center class="tempName"><font size="4" >  <br> ATTENTION PRACTITIONER : PLEASE FILL IN ALL BLANK FIELDS TO ENSURE TIMELY DELIVERY </br> </font></center></div>
</apex:page>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.