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
aka_floaka_flo 

space and line at top of visualforce page

I can't figure out how to get rid of the space and the line at the top of my Visualforce page.  See the attached screenshot, which shows the extra space that it is taking up that is not at all necessary.

Does anyone have any ideas on how to make it go away?  It would be a great help.  Thanks.
 
aka_floaka_flo

Sorry I forgot to include my code, so here it is:

<apex:page standardController="Opportunity" showheader="false" sidebar="false" >
<apex:form >
<style>
body {font-family: Arial;}
</style>
<apex:pageBlock rendered="{!Opportunity.StageName == 'Negotiation/Review'}" mode="inlineEdit" >
<apex:pageBlockButtons >
<apex:commandButton action="{!edit}" value="Edit" rendered="no"/>
<apex:commandButton action="{!save}" id="saveButton" value="Save" rendered="no"/>
<apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel" rendered="no"/>
</apex:pageBlockButtons>
<apex:pageblocksection columns="1" >
<apex:outputPanel style="font-size:small;text-align:top" >
<table>
<tr>
<td>
<apex:outputText value="Designated CSL:" />
</td>
<td>
<apex:outputField value="{!Opportunity.Designated_CSL__c}">
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:outputField>
</td>
</tr>
<tr>
<td>
<apex:outputText value="Designated CSM:" />
</td>
<td>
<apex:outputField value="{!Opportunity.Designated_CSM__c}">
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:outputField>
</td>
</tr>
<tr>
<td>
<apex:outputText value="Pro Tech/Support:" />
</td>
<td>
<apex:outputField value="{!Opportunity.Pro_Tech_Support__c}">
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:outputField>
</td>
</tr>
</table>
</apex:outputPanel>
</apex:pageblocksection>
</apex:pageBlock>

</apex:form>
</apex:page>

S91084S91084

Have you tried, showHeader = false for the <apex:pageblock>. It looks like

 

<apex:pageblock showHeader = false>

aka_floaka_flo

Thanks for the suggestion!  I tried this out and I get an error message
Error: Unsupported attribute showheader in <apex:pageBlock> in Responsibility at line 6 column 121

PaqsPaqs

Hi aka_flo,

 

You can simply add the following style override in your page:

 

<style>
.bPageBlock { border-top: 0px; }
</style>

 

This will make the top border a 0px line, hence, will make it disappear.

 

Note: On trick to know what to change if you need more styling tweaks is to use the "Inspect Element" of your browser which will allow you to see what those styles and components are in the page so you can modify them.

 

Hope this helps