x

Video background for desktop and mobile on Weebly free version [SOLVED]

Hi all,

Video backgrounds have become standard on many websites. There have been many statements on this forum and others around the world saying that it's not possible on Weebly's free version. I set about to prove that it can be done. Furthermore, I also wanted to ensure that they were playable on mobile devices too. I know this is controversial, however given that the video file size on my demo site is only 1.9MB, it's not really a data-hungry element when you weigh up the visually engaging impact of a video background.

I'm sorry, but I don't have time to guide individuals through specifics on their own site, however I will add my code to the page at some stage soon. It does however involve editing of the theme and SEO settings.

http://mjcsdemo.weebly.com/video-background.html

image

2,850 Views
Message 1 of 8
Report
1 Best Answer
Square

Best Answer

This is fantastic - thank you for sharing, @MJCS! Also, welcome back! It's been a bit but your earlier posts are still hugely appreciated. Smiley Happy

View Best Answer >

2,818 Views
Message 5 of 8
Report
7 REPLIES 7

Mark:  That is wonderful.  It has been a long time.  I wanted to send you  PM, but for some reason the e-mail function can't find user name MJCS....Can you PM me and tell me how can I message you?  I want to ask you a question.  Are you still in Australia?

2,821 Views
Message 4 of 8
Report
Square

Best Answer

This is fantastic - thank you for sharing, @MJCS! Also, welcome back! It's been a bit but your earlier posts are still hugely appreciated. Smiley Happy

2,819 Views
Message 5 of 8
Report

This is amazing, thank you! But how do you do it???? I just spent forever adding a video header only to learn it doesn't work on mobile, which is what 99% of people use. Help please!

2,762 Views
Message 5 of 8
Report

HOW?? @MJCS do you have the code posted somewhere? I desperately want to do this on my site.

2,680 Views
Message 6 of 8
Report

Hi Thanks for this.

I have just finished a client site and really need to have this work on mobile or I will lose all credibility with my client. Can you please send me the code to do this?? I have 3 days Smiley Sad

Thanks so much

1,435 Views
Message 9 of 8
Report

Hi all,

This is what worked for me...

I created a new Header Type in the Theme>Edit HTML CSS section of the editor. Call it whatever you like - mine's HeaderWithBGVideo.

In the <head> add the content below <style> video.... </style> (marked red)

The next step it to add content to the header div .... (marked red)

Upload your files to the Theme section and then change the file locations in the code (marked green) below to suit your file names.

This could look different to yours depending on your theme.

Once you're done, then go back to the main page where you want the video and change the Header Type to be HeaderWithBGVideo.

Hope that gets you in the right direction.

Cheers,

Mark

<!DOCTYPE html>
<html>
<head>
	   
<style>
video { 
    position: fixed;
    top: 50%;
    left: 50%;
min-width: 100%; min-height: 100%; width: auto; height: auto; z-index: -100; transform: translateX(-50%) translateY(-50%); background: url('http://YOURSITE/FALLBACK-IMAGE.jpg') no-repeat; background-size: cover; transition: 1s opacity; } </style> </head> <body class='header-page page-has-banner wsite-theme-light'> <div class="wrapper"> <div class="birdseye-header"> <div class="nav-wrap"> <div class="container"> <div class="logo"></div> <div class="nav desktop-nav">{menu}</div> <label class="hamburger"><span></span></label> </div> </div> </div> <div class="banner-wrap"> {{#header}} <div class="container"> <div class="banner">{content}</div> </div> <video poster="http://YOURSITE/FALLBACK-IMAGE.jpg" id="bgvid" playsinline autoplay muted loop> <source src="http://YOURSITE/YOUR-VIDEO.mp4" type="video/mp4"> </video> {{/header}} </div> <div class="main-wrap"> {{#sections}} <div class="container">{content}</div> {{/sections}} </div> <div class="footer-wrap"> <div class="container"> <div class="footer">{footer}</div> </div><!-- end container --> </div><!-- end footer-wrap --> </div><!-- /.wrapper --> <div id="navMobile" class="nav mobile-nav"> <label class="hamburger"><span></span></label> {menu} </div> <script type="text/javascript" src="/files/theme/plugins.js"></script> <script type="text/javascript" src="/files/theme/custom.js"></script> <div style='display:none'>{title}</div> </body> </html>
1,430 Views
Message 9 of 8
Report

You're amazing! Thank you for sending this through... however, there seems to be something I am doing wrong as it's not working for me.

I was wondering and I am happy to pay you, if you would be able to go in and do it for me. I feel I am falling back with the step that says: 

The next step it to add content to the header div .... (marked red)

 

 Upload your files to the Theme section and then change the file locations in the code (marked green) below to suit your file names.

 

 This could look different to yours depending on your theme.

1,415 Views
Message 9 of 8
Report
This thread has been archived and locked. Please start a new thread if you would like to continue the conversation.