Jump to content

Adding a video centered above a blog post

Recommended Posts

I want to add a YouTube video as a top image on a blog post. If I use the video block, I can add the YT link and it works, but it fills he page width and therefore the entire screen.  I want to embed it smaller so that the first few lines of the blog post text is still visible when the page loads.

I can use an embed block and YT embed code and the video embeds smaller, but it's left justified and not centered. I tried using spacer blocks to center it but the embed block doesn't seem to be tied to the video width so I can't center it. The spacers on each side are the same size but the embed block is narrower than the video, so the video ends up off center.

I tried this in Firefox and Chrome with the same results.

BTW, why is it so difficult to add a video or image that isn't the full post width and keep it centered? For all hype about Squarespace being easy, this simple thing is much too difficult. Or maybe I'm just making it difficult, but everything I've read says that you can't simple center things, you've got to add spacers to each side.  And then, there's no way other than visually to actually make the spacers the same width.

Edit: I managed to fudge the LH spacer width to visually center the video. Still harder than it ought to be.

Edited by salguod
Link to comment
  • Replies 2
  • Views 1.8k
  • Created
  • Last Reply

Top Posters In This Topic

This is tough sometimes no doubt. 

Here are the steps on how to center a YouTube video in Squarespace using an embed block - or at least how I've done it in the past. 

  1. Go to the page where you want to add the video.
  2. Click the "Add block" button and select "Embed".
  3. In the "Embed code" field, paste the embed code for the YouTube video.
  4. Click the "Settings" button and scroll down to the "Alignment" section.
  5. Select "Center" from the "Horizontal alignment" dropdown menu.
  6. Click the "Save" button.

The video will now be centered in the embed block.

Here are some additional things to keep in mind:

  • The embed block will automatically resize to fit the width of the content area. If you want to change the size of the embed block, you can do so by dragging the edges of the block.
  • You can also use spacers to center the video. To do this, add a spacer block to the left and right of the embed block. In the "Settings" menu for the spacer block, set the "Width" to "50%". This will create two spacers that are each half the width of the embed block. The video will then be centered between the two spacers.
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.