I am developing app in salesforce and i don't have any idea about standardstylesheets in vf page. In my app i have created my own style sheet added to static resources and i am using my stylesheet not standardstylesheets of salesforce. This is working fine but now in my vf page if i create any look up input field it is not providing me search link for look up. Example:

<apex:page controller="controllermethod" standardStylesheets="false" showHeader="false">
 <apex:form >
  <apex:pageBlock mode="edit"><br/><br/>
        <div class="row">
       <apex:outputLabel styleClass="label" value="Project Name " /> 
       <apex:inputField styleClass="field" value="{!newproj.Name}"/>
      <apex:repeat value="{!moduleList}" var="module">
      <div class="row">
       <apex:outputLabel styleClass="label" value="Module " id="test"/> 
       <apex:inputField styleClass="field" value="{!module.Name}"/>
       <div class="row">
       <apex:outputLabel styleClass="label" value="Vendor " id="test1"/> 
       <apex:inputField styleClass="field" value="{!module.Vendor__c}"/>

      <apex:commandButton value="Save" action="{!savecreatenew}"/>
      <apex:commandButton value="Cancel" action="{!closePopup}" />


In this vf page module and vendor are look up fields but it is just displaying text box no look up button link.How i can solve this problem.Is it possible to use standardStylesheets component wise?


You can mix custom CSS with the standardStylesheets simply by changing your standardStylesheets parameter back to true.

Of course this will add styling to a lot of your components, so you might want to switch out the <apex:pageBlock> for a regular div to give you more control over it. Your styling can be overridden by the Salesforce styles however using !important in appropriate places should help with that.

| improve this answer | |
  • If i make standardStylesheets to true my style sheet is not working. – Jayant Jadhav Aug 20 '13 at 5:15
  • Most likely this is because you are using pageBlock. The pageBlock tags are really mostly about reproducing standard look and feel. LacySnr's suggestion about getting rid of page blocks should help. You can either use DIV or <apex:outputPanel layout="block"> which generates divs, but if you don't want it to look like Salesforce, don't use pageBlock anything. – pchittum Aug 20 '13 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.