Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
duggy
Advocate II
Advocate II

IFrame dashboard has borders around it and drops down in the frame

Hi,

 

I embedd the iFrame with the link to the powerbi dashboard that I have built. The iframe keeps getting this space above it. When you zoom the page in to 80% then the dashboard moves to the top of the iframe, anything more andit keeps dropping down.

 

Please see image below. You can see the brown above the dashboard in the iFrame and as you zoom the page down to 80% it moves to the border.

 

At the same time there are 2 borders about the iFrame that I am trying to get rid of. The iFrame code is below:

Capture.JPG

 

Iframe embedding code:

					<DIV class="row">
						<DIV class="col-md-12">
							<DIV class="panel">
								<DIV class="panel-content">
									<P style="display: block;" class="">
										<style>iframe{width: 1px;min-width: 100%;}</style>
										<iframe id="idIframe" src="http://mylink.com/mydashboard.aspx?Value=94"></iframe> 
										<script>iFrameResize({log:true}, '#idIframe')</script>
									</P>
								</DIV>
							</DIV>
						</DIV>
					</DIV>

In the aspx file the code is as follows:

 

    
    <script> 
        $(document).ready(function () {   
            var models = window['powerbi-client'].models;
            //debugger
            var config = {
                type: 'report',
                tokenType: models.TokenType.Embed,
                accessToken: accessToken,
                embedUrl: embedUrl,
                id: embedReportId,
                permissions: models.Permissions.All,
                settings: {
                    filterPaneEnabled: false,
                    navContentPaneEnabled: false,
                    localeSettings: {
                        language: "en-GB",
                        formatLocale: "en-GB"
                    }
                }//,
                //pageName: sectionName
            };
           
            var reportContainer = $('#reportContainer')[0];
            var report = powerbi.embed(reportContainer, config);           
        });
        

    </script>

</head>
<body style="vertical-align: top;position: relative;top: 0;">
    <form id="form1" runat="server" style="vertical-align: top;position: relative;top: 0;">
    <div style="vertical-align: top;">
        <div id="reportContainer" style="height:850px;width:100%;vertical-align: top;position: relative;top: 0;left:0;"></div>
        <asp:Label Id ="lblMessage" runat="server" />
    </div>
    </form>
</body>

Looking to get rid of the two borders as well as making the dashboard climb to the top of the iframe.

Much appreciated.

0 REPLIES 0

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.