The iFrame macro enables you to display a web page within a Confluence page. Below is an iFrame containing www.adaptavist.com. You can also combine the iframe macro with our CSS Style Sheet macro to customize its appearance.
The iFrame macro is configured by the Confluence administrator. By default, it is rendered with the sandbox attribute.
Learn more about the Iframe macro configuration before you begin.
Watch our video walkthrough to see the Iframe macro in action.
- Navigate to the page where you want to display a web page.
- Click Edit.
- Click Insert More Content > Other Macros.
Select the iFrame macro from the Macro Browser.
Complete the desired fields.
Parameter Description Type Default Required
The URL of the page to show in the iframe.
Use in combination with Global Confluence CSS or a CSS Stylesheet macro that you have added to your page.
Enter the CSS class name(s) to apply to the macro (case sensitive); multiple classes can be separated by a space or comma. Do not include the
.selector in the class name.
Option to apply an inline style, using CSS, to an individual div tag body content; useful for adding borders or padding, e.g.
border: 3px solid-red.
This style does not need to be defined in a CSS Stylesheet macro.
Text Shown on Hover
Enter text that displays as a tooltip to users on hover.
Set the width of the image in px (eg. 270px), or percentage of the page (eg. 70%)
Set the height of the image in px (eg. 270px), or percentage of the page (eg. 70%)
A url to a page that contains a long description of the content within the Iframe
Allow Full-Screen Mode
Allows Iframe to be viewed fullscreen
Specifies a unique name of the Iframe (to use in scripts)
You can choose ltr (left to right) or rtl (right to left)
Enter a language code if you want to specify that the element content language is different from the default language of your page, e.g.
defor German. Browsers will identify that the content is written in German.
The URL parameter must be specified for this macro to work.
Click Insert. The macro placeholder displays.
- Save the page to view the web page on your Confluence page.
Content that previously worked no longer displays
The Iframe macro shows a blank area instead of imported content. This Iframe used to work as expected but now shows a blank box.
There are two reasons why content that used to display in the Iframe macro may no longer show in a Confluence page.
- The administrators of the website have set an option on their server that prohibits the inclusion of their site's content in Iframes. This setting is called the The X-Frame-Options response header, as described by Mozilla .
The browser is stopping the inclusion of content from another site for security reasons. This is a feature of modern browsers called Mixed Content Blocking as described by Mozilla.
Both the scenarios described above are beyond the control of the Iframe macro and its developers.
If you are affected by this problem, try one of the following:
https://at the start of the Iframe source web address e.g. https://www.adaptavist.com - this can help with mixed content blocking.
Use an alternative method of importing content, such as the HTML Include macro - please read the caveats on the linked page carefully.
Remove the Iframe macro from the page and link directly to the content instead.