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
dev_forcedev_force 

Visualforce page in an iFrame - style appears All Black

The main visualforce page looks something like:

 

<apex:page id="mainPage" tabStyle="Custom_Visualforce__tab" controller="SomeCustomController">

-- some content --

<apex:outputPanel layout="block" id="detail">
<apex:iframe src="{!someUrl}" scrolling="false" height="500px" width="100%" />
</apex:outputPanel>

</apex:page>

 

 

 

"someUrl" points to the following visualforce page:

<apex:page standardController="Document" standardStylesheets="true" tabStyle="Custom_Visualforce__tab" extensions="SomeDifferentCustomController" showHeader="false" sidebar="false" >

-- some content --

</apex:page>

 

 

The main visualforce page appears styled according to the Custom_Visualforce__tab style.  However, the visualforce page style in the iFrame appears all black.

 

 

Is it possible to style a VF page in an iframe so that it follows a custom tab style?

Edward GeeEdward Gee

What about trying that one trick I read here about declaring the body element in your VF page?

 

 

<apex:page standardController="Document" standardStylesheets="true" tabStyle="Custom_Visualforce__tab" extensions="SomeDifferentCustomController" showHeader="false" sidebar="false" > <body class="Custom41Tab"> -- some content -- </body> </apex:page>

 

 Would that work? 

 

 

 

dev_forcedev_force

Thanks for the reply.

 

Adding a body tag with class property doesn't seem to help.

paul-lmipaul-lmi

I believe the tabStyle is limited to object tab styles, including both standard objects such as "Case", and custom ones via "Object__C".

 

Edit:  I stand corrected.  This "should" work as your trying to use it, per the documentation.  Are you sure you're using the Name of the tab and not the Label (if different)?

Message Edited by paul-lmi on 03-27-2009 03:10 PM