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

VF page within Contacts Detail Page

Hello,  I have a visualforce page that I am trying to include in the Contacts Details page. The VF page contains a table with rows (different contacts have different number of rows in the table).

I added a new Section to the Contacts Page Layout and then added the VF page below the new Section.  Then set the Height to 200 px and Show scrollbars to True.


When a Contact with no rows or just a few rows in the table is displayed, there is white space below the table.  How can I size this table to eliminate the white space.  And there is an additional border around the table, how can I remove this?


I would like this VF page to be seamlessly integrated with the Contacts Page without the extra borders and with only the scroll bar for large tables.  How can I achieve this?




WRT the whitespace, the short answer is that you can't.   The VisualForce section is an iframe of fixed size inside the record view page.  As the VisualForce page is served from a different server to the main page, it is not possible to make the main page resize the iframe on demand.  This is one of the compromises when embedding VisualForce.


WRT the table border - which VF components are you using the build the table?


Removing whithe spaces is possible by using floating div concept. Try the following sample code :


<div style="text-align:left; vertical-align:top; width:90%; position:absolute; filter:alpha(opacity=100, style=0); -moz-opacity:50%; z-index:100;">your code here </div>


Hope this helps.