[SalesForce] Visualforce Help Text Background Color

I have a Visualforce page that utilizes a help orb to mimic the standard Salesforce help orb. All works properly, but I would like to change the background color of the pop-up help box. Does anyone know how I can do this? My code for the orb is below:

<span class="helpButton" id="Name-_help">
     <img src="/s.gif" alt="" class="helpOrb" title="{!$Label.DS_RichTextHelpText}"/>
</span><p/>

Best Answer

You can add the style attribute as below.

<span class="helpButton" id="Name-_help" style="background-color: yellow;">
     <img src="/s.gif" alt="" class="helpOrb" title="{!$Label.DS_RichTextHelpText}"/>
</span><p/>

Update

Here I have tried to mimic the Salesforce help style with the help of the “helpOrb” class supplied by the standard SFDC stylesheets.

<apex:page >
    <style>
        .vfHelpText a {
            position:relative;
        }
        .vfHelpText a span {
            display: none;
        }
        .vfHelpText a:hover span {
            display: block;
            position:absolute;
            top:1.25em;
            padding:2px 5px;
            left:-15em; width:15em;
            z-index:100;
            border:1px solid orange;
            background-color:#FEFDB9;
            color:black;
        }
    </style>
    <span class="vfHelpText">
        <apex:outputLink value="javascript:return false;">
            <img src="/s.gif" alt="" class="helpOrb" />
            <span>{!$Label.DS_RichTextHelpText}</span>
        </apex:outputLink>
    </span>
</apex:page>
Related Topic