function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

CSS | Required for lookup


I have added a css like below on a input field like below
<apex:inputField value="{!caseObj.AccountId}" styleClass="CSS_required"/>

.CSS_required{border-left: 3px solid red;}

it is dispplayed like:

User-added image
How can i move the red bar to the left ?
Best Answer chosen by Ab
You can directly use required attribut in input field instead of using css. Below is the sample code

<apex:page standardController="Case" >
<apex:outputLabel value = "Account Name"></apex:outputLabel>
<apex:inputField value="{!Case.AccountId}" required="true"/>