Skip to main content
Pratima Shrivastav (Slalom) 님이 #Visualforce에 질문했습니다
Hi folks,

  I am using outputLabel to display some text in my visualforce page. But I wanted to format only a part of the text and make it bold or change its color. I tried using CSS but it formats the everthing inside outputLabel. How can I only format a portion of it?

Thank you
답변 1개
  1. 2016년 9월 6일 오후 4:00
    Hello prati@salesforce,

    Try using a span tag inside your label. Please, refer to the code below:

     

    <apex:page standardController="Account">

    <style type="text/css">

    .my-class {

    font-weight: bolder;

    }

    </style>

    <apex:form >

    <apex:outputLabel><span class="my-class">Hello</span> World!</apex:outputLabel>

    </apex:form>

    </apex:page>

    Regards.

    Don't forget to mark your thread as 'SOLVED' with the answer that best helps you.

     
0/9000