I have created a visual force page and added that page on top of the standard layout using visual force pages section. My page is to only display a message to user once criteria matches. I am achieving that using standard rerender . below is my page code.
<apex:outputPanel rendered="{!(opp.Type__c = 'In') }" >
<table class="messageTable" style="padding:0px;margin:0px;" border="0" cellpadding="0" cellspacing="0">
<h4>
<apex:outputPanel rendered="{!opp.Authorization__c = null}"> Test Message 1 </apex:outputPanel>
<apex:outputPanel rendered="{!opp.Authorization__c != null}">Test Message 2</apex:outputPanel>
</h4>
</table>
</apex:outputPanel>
<apex:outputPanel rendered="{!(opp.value__c = '100') }" >
<table class="messageTable" style="padding:0px;margin:0px;" border="0" cellpadding="0" cellspacing="0">
<h4>
<apex:outputPanel rendered="{!opp.Authority__c = null}"> Test Message 3 </apex:outputPanel>
<apex:outputPanel rendered="{!opp.Authority__c != null}">Test Message 4</apex:outputPanel>
</h4>
</table>
</apex:outputPanel>
Now problem is above code only displays message when this criteria matches. As there are 4 messages it occupies 100px on the top of the page. So when criteria does not match I get 100 px of empty space on standard layout.
Does anyone know any way of removing that? I have tried through CSS way salesforce doesn't allow that.