Jump to content

Cannot Resize the Video in Code Block

Recommended Posts

Site URL: https://www.gallopapartments.com/

Hi @tuanphan

I cannot adjust the size or center this video via unlinked files. I don't want to insert a Youtube link via the page's banner because it shows top and botom black borders that I don't want. So I added this code from https://www.amusing.ly/blog/2018/8/10/looping-videos-on-squarespace to the Code block to display my video instead. But I don't know why the video gets out of the frame. Please see picture below. The video is on the home page. Can you show me how to adjust its size and how to center the video?

Website: www.gallopapartments.com

Password: hello

Thank you.

Best,

 

image.thumb.png.185165146256e2ed03a274d7138ac72a.png

Link to comment
  • Replies 7
  • Views 2.4k
  • Created
  • Last Reply

@tuanphan

I tried adding width: 100%, but the results is still the same

This is the code I put in code block. The video is till off center.

<video muted
       src="/s/Testing.mp4"
       width: 100%
       autoplay
       loop>
    Sorry, your browser doesn't support embedded videos.
</video>

image.thumb.png.5caa5a242963b9c9fd8cce32864e5a34.png

Link to comment

The video is centered, but the size is too small. When I adjusted its width: 200%, it is off center again. Is it possible to make the video cover full-width of the page and have parallax? Similar to when you insert a YouTube link to Banner setting.

Link to comment

Add to Home > Design > Custom CSS

section#banner {
  div#block-yui_3_17_2_1_1594006058550_4675, video {
      width: 100%;
  }
  .Index-page-content {
      padding-left: 0;
      padding-right: 0;
      max-width: 100%;
  }
}

Parallax. I'm not sure.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.