You need to sign in to do that
Don't have an account?
apex:outputText style not able to set font to bold
I am trying to add bold font formatting by using the style attribute. I am able to set the style to italic, or the color to red, but not the font-weight;
<apex:pageBlockSectionItem >
<apex:outputText style="font-weight:900;" value="This text should be in BOLD" />
<apex:inputField value="{!Opportunity.Test_Field__c}"/>
</apex:pageBlockSectionItem>
I would also like to be able to insert a line-feed in the outputText if possible.
I tried adding the escape="true" attribute, but wasn't able to add <B></B> or <BR> tags that were recognized by the browser as HTML.
All Answers
Hm, I just tried and both approachs (using the style and using escape=false with embedded markup) work for me. There must be something else in your page that is affecting it somehow....
Thanks for the fast reply. Can you provide the code which worked? I'll compare this to mine to see if I have a syntax error or am missing something.
It looks like styling on label doesn't work appropriately once there's an inputField or inputText in the same pageBlockSectionItem. I ended up using <big></big> instead of <b></b> and this worked well enough.
Thanks for your help