ads

Tuesday, 28 August 2018

Hide lines and borders in pageBlock tag in Visualforce Page

Code Format:

<apex:page standardController="Contact" sidebar="false">

 <style>

    .bPageBlock .pbBody .dataCol {

        border:0px;

    }

    .bPageBlock .pbBody .labelCol {

        border:0px;

    }

</style>

    <apex:form >

        <apex:pageBlock mode="maindetail">

            

                <apex:pageBlockSection columns="2"  >

                <apex:selectList value="{!Contact.Name}"/>

                <apex:inputField value="{!Contact.AssistantName}"/>

                <apex:inputField value="{!Contact.Birthdate}"/>

                <apex:inputField value="{!Contact.Department}"/>

                <apex:inputField value="{!Contact.LeadSource}"/>

                <apex:inputField value="{!Contact.Phone}"/>


            </apex:pageBlockSection>

            <apex:pageBlockButtons >

                <apex:commandButton value="Save" action="{!save}"/>

                <apex:commandButton value="Cancel" action="{!cancel}"/>

            </apex:pageBlockButtons>

        </apex:pageBlock>

    </apex:form>

</apex:page>


Output:


No comments:

Post a Comment