Embed code, maps and other content onto a page
Embedding content on your website from elsewhere is an easy way to integrate with other services and make your content richer.
Add embed code
- Get your embed code:
- Maps: follow Google's instructions to create a map and get the embed code.
- Other content: The method for obtaining embed code for other content may vary, adding it to your website will always follow this process.
- Go to the page on which you want to add content.
- Choose Add > Embed from the contextual toolbar.
- Paste in your embed code.
- Click Save.
Aligning embedded content
Third-party content is often embedded using an iframe. You can add or edit the style attributes of the iframe directly but sometimes it can be tricky to know exactly what to do to get things to look the way you want. One tip that always works is to add a <section> tag around the iframe like this:
<section class="narrow center"> <iframe> ... </iframe> </section>
This will enclose the entire iframe in a section with attributes you can control.
- The narrow class will constrain the iframe to the same narrow content width that is available on other blocks.
- The center class will align the content to the centre of the page.