March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Register NowGet certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi,
I have created a report having length and width as 1400 and 2400 px. i embedd this report in a website. The height and width of the iframe is set to 100% by 100%. but the dashboard isnt fitting well. There is some white space under the dashboard. i want it to perfectly filt without any space. Can anyone explain how could i do that?
Thanks
Hi @ShahidYumeen - To make a Power BI report fit perfectly in an iframe without white space, you can adjust both the iframe styling and the report settings.
Go to your Power BI Desktop file, and in the "View" tab, enable the Responsive layout for your visuals if it’s not already enabled. This ensures that the visuals adapt to different screen sizes.
Set your report page size to "Fit to Page" under the Canvas settings in Power BI Desktop. This setting automatically resizes the content to fit within the iframe dimensions.
Ensure the iframe itself is styled in CSS to fill the parent container
<iframe
src="YOUR_POWER_BI_EMBED_URL"
style="width: 100%; height: 100%; border: none; overflow: hidden;"
allowfullscreen="true">
</iframe>
In Power BI Service, when you generate the embed code, check that your settings allow for the "Fit to page" or "Actual size" under View options for embedding. This can sometimes affect how the report adjusts within the iframe.
Hope this helps.
Proud to be a Super User! | |
Hi,
Thanks for the response.
My report settings -> page view is set to "fit to page". ANd the iframe is also styled same as given. Still there is some white space under the report. I have a question what if we manually set the size of the report like instead of 100% by 100%, i set it to 1400px by 2400 px?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
41 | |
35 | |
31 | |
26 | |
12 |