You need to sign in to do that
Don't have an account?
Travis Icenogle
How to make Visualforce Fit Page Layout iFrame Width
Hello,
I am brand new to Visualforce and relativily new to Salesforce in general. I have created a simple Visualforce page that I am inserting into a Lightning Page Layout section. I can not seem to get the VF page to fill out the width of the page layout section.
I know the height is set at the page layout point, I think I have it at 300.
From digging, I am seeing that it can be done via jquery with iframe, but I am not finding a way to actually make it work.
Can anyone help guide me in the right direction?
thanks,
Travis
I am brand new to Visualforce and relativily new to Salesforce in general. I have created a simple Visualforce page that I am inserting into a Lightning Page Layout section. I can not seem to get the VF page to fill out the width of the page layout section.
I know the height is set at the page layout point, I think I have it at 300.
From digging, I am seeing that it can be done via jquery with iframe, but I am not finding a way to actually make it work.
Can anyone help guide me in the right direction?
thanks,
Travis
I've gone through your requirement and you can simply achieve it by javascript:
-->The trick is to resize the iframe with JavaScript after you know the size of the browser viewport:
-->And for more details you can go through below links:
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_config_for_app_builder_width_aware.htm
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com
https://salesforce.stackexchange.com/questions/30605/how-to-create-visualforce-page-with-iframe-with-auto-resizing-height
At least give credit to the person you stole your answer from.