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
Sushant RaoSushant Rao 

Get rid of Pageblock border

I tried my best searching for something like this. Sorry if this is a respost.


I've got this inline visualforce page embedded in my Opportunity Page. Does anyone know how to get rid of the border that's produced when using this code below. The pageblock adds the a border that the title would typically sit inside. I want to be able to use the pageblock tag without having any borders. Can I get rid of those yellow borders ? Thanks in adv


<apex:page standardController="opportunity" extensions="OppSearchExt" >

        <apex:pageBlock mode="edit"  >


</apex:form >




Change your pageblock mode to maindetail.

Sushant RaoSushant Rao

Thanks for the suggestion, it doesn't work. Also now labels and input fields are not aligned right.



I am also still on this issue, I am afraid you only can 'hack/fix' this using javasript and css. The CSS logic for the borders is that complex that I haven't found a solution for it yet. But I think it should be possible by getting a specific element and add an additional style, where the color of the borders are the same as the background.


Would be nice if this can be fixed in future versions by adding the styleClass attribute to the pageBlock tag or another property.


Setting mode to maindetail fixed it for me.


<apex:pageBlock mode="maindetail">