Sunday, December 18, 2022

CSS for changing the color of a hyper link


<apex:page sidebar="false" standardController="Sample__c">
    <head>
    <style type="text/css">
    a:link {
    COLOR: #FF0000;
    }
    a:visited {
    COLOR: #008000;
    }
    a:hover {
    COLOR: #FF0000;
    }
    a:active {
    COLOR: #00FF00;
    }
</style> 
    </head>
    <apex:form >
        <!-- Designing Sidebar -->
        <table>
         <tr>
          <th width="200" valign="top">
        <apex:outputPanel >
            <apex:pageblock title="Sidebar">
                <apex:pageblockSection columns="1">
                    <apex:commandlink value="One"/>
                    <apex:commandlink value="Two"/>
                </apex:pageblockSection>
            </apex:pageblock>
        </apex:outputPanel>
        <!-- All pages comes here -->
         </th>
         <th>
        <apex:outputPanel >
            <apex:pageblock title="One">    
                <apex:pageblockSection >
                    <apex:inputField value="{!Sample__c.name}"/>
                    <apex:inputField value="{!Sample__c.City__c}"/> 
                </apex:pageblockSection>
            </apex:pageblock>
            <apex:pageblock title="Two"> 
                <apex:pageblockSection >
                    <apex:inputField value="{!Sample__c.Mobile__c}"/>
                    <apex:inputField value="{!Sample__c.Salary__c}"/> 
                </apex:pageblockSection>
            </apex:pageblock>
        </apex:outputPanel>
          </th>
         </tr>
        </table> 
    </apex:form>
</apex:page>

<apex:page sidebar="false" standardController="Sample__c" Extensions="sample">
<body text="#507070" link="#900000" alink="#D06000" vlink="#C08000" bgcolor="#FFD078">
    <apex:form >
        <!-- Designing Sidebar -->
        <table>
         <tr>
          <th width="200" valign="top">
        <apex:outputPanel >
            <apex:pageblock id="Sidebar">
                <apex:pageblockSection columns="1" title="Sidebar" collapsible="false">
                    <apex:commandlink value="One" action="{!pageOne}" style="color: #CC0000"/>
                    <apex:commandlink value="Two" action="{!pageTwo}"/>
                </apex:pageblockSection>
            </apex:pageblock>
        </apex:outputPanel>
        <!-- All pages comes here -->
         </th>
         <th>
        <apex:outputPanel >
            <apex:pageblock title="One" rendered="{!page1}">    
                <apex:pageblockSection >
                    <apex:inputField value="{!Sample__c.name}"/>
                    <apex:inputField value="{!Sample__c.City__c}"/> 
                </apex:pageblockSection>
            </apex:pageblock>
            <apex:pageblock title="Two" rendered="{!page2}"> 
                <apex:pageblockSection >
                    <apex:inputField value="{!Sample__c.Mobile__c}"/>
                    <apex:inputField value="{!Sample__c.Salary__c}"/> 
                </apex:pageblockSection>
            </apex:pageblock>
        </apex:outputPanel>
          </th>
         </tr>
        </table> 
    </apex:form>
    </body>
</apex:page>

Refer:
http://www.goldcoastwebdesigns.com/change-hyperlink-color.shtml

No comments:

Post a Comment

Understanding Wire vs Imperative Apex Method Calls in Salesforce Lightning Web Components (LWC)

Understanding Wire vs Imperative Apex Method Calls in Salesforce Lightning Web Components (LWC) Introduction: Salesforce Lightning Web ...