Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26674
    Tammy
    Guest

    Ok so I have been trying really hard to center the embedded iframe code using the text editor. Is there any easy way to do this???

    #26703
    Jesse Owens
    Keymaster

    Hi Tammy-

    One trick I use to format embedded content, including an iFrame Google Doc, is to use the Block Library’s Audio and Video block type, and then replace the [embed] code for the video with the iFrame.

    Either way, you’ll need centered section of a block to center your iFrame. Here’s the basic HTML you’ll need:

    <div class="row">
    <div class="col-md-12 col-xs-12 col-sm-12 text-center">
    <iframe src="https://docs.google.com/document/d/e/your-embed-code/pub?embedded=true" width="640px"></iframe>
    </div>
    </div>

    I found that I needed to specify a “width” property for the iFrame, by default it was very small. You can change the width of 640px to suit your needs.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘How to center an embedded google doc using an iframe’ is closed to new replies.