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
AbAb 

CSS | Required for lookup

Hello,

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
Hemant_JainHemant_Jain
You can directly use required attribut in input field instead of using css. Below is the sample code

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