Weebly Tricks #84 — ClassyCountdown Timer
Add a clean countdown timer to your Weebly site, created by Marius Stanciu.
Learn how to customize and modify your Weebly site with new effects, plugins, and widgets.
Welcome to My Weebly Tricks, a resource for Weebly site owners who want to go beyond the basics. Here you'll find step-by-step guides on adding image effects, slideshows, navigation scripts, text animations, countdown timers, and more — all tailored for the Weebly platform.
A full-width video background can make a Weebly homepage feel more polished and memorable. It works particularly well for travel businesses, cafés, photographers, event organisers, fitness studios and creative portfolios that want to show atmosphere before visitors start reading.
Weebly does not provide a dedicated “YouTube background” element in its standard editor. However, you can create the effect by placing a YouTube player inside an Embed Code element, then adding a small amount of HTML and CSS to control its position, size and appearance.
The key is to treat the video as a visual layer rather than a normal piece of content. It should sit behind a heading, button or short introduction, while the text remains readable and the page continues to work when the video cannot load.
Australian visitors may browse on mobile data, an older laptop or an NBN connection that performs differently from suburb to suburb. A well-built background therefore needs a fallback colour, a compressed video and a clear mobile layout rather than relying on moving imagery alone.
The best background videos are wide, simple and visually steady. A short clip of waves near Bondi, a barista preparing coffee, a coastal drive or a quiet studio can support a message without competing with it. Avoid clips containing important speech, small text or fast cuts, because those details are difficult to follow when the image is cropped across different screen sizes.
You also need permission to use the footage. Uploading a video to YouTube does not automatically give you the right to use someone else’s music, film or commercial footage on your website. Use your own recording, licensed stock footage or a clip published with suitable usage rights. YouTube’s privacy-enhanced mode can help reduce tracking by changing the embed domain, although it does not replace permission from the copyright holder.
Keep the file short and visually consistent. A 10- to 30-second loop is usually enough for a hero banner. A video recorded in landscape format will generally behave better than a vertical phone clip. For a business serving customers in Melbourne, Brisbane or Perth, a clean opening frame is especially useful because it may appear for several seconds while the video buffers.
If your page includes sound, let the visitor start it manually. Browsers commonly block autoplay when audio is enabled, and unexpected sound can be annoying in a library, office or public space. A silent background with a separate play button is usually the more reliable design.
Open the YouTube video, select Share, choose Embed and copy the iframe code. You can use that code as a starting point, but background playback needs additional parameters. The following version hides most player controls, starts the video silently and attempts to repeat it:
<div class="yt-background">
<iframe
src="https://www.youtube-nocookie.com/embed/VIDEO_ID?autoplay=1&mute=1&controls=0&loop=1&playlist=VIDEO_ID&playsinline=1&rel=0"
title="Background video"
frameborder="0"
allow="autoplay; fullscreen"
allowfullscreen>
</iframe>
<div class="hero-content">
<h1>Made For Slow Mornings</h1>
<p>Fresh coffee, local produce and a warm welcome.</p>
<a class="hero-button" href="/contact">Visit Us</a>
</div>
</div>
Replace both instances of VIDEO_ID with the ID from the YouTube address. For example, in youtube.com/watch?v=abc123xyz, the video ID is abc123xyz. The playlist value may look unnecessary, but YouTube generally requires the same video ID there for a single-video loop to work.
The important parameters have specific jobs. autoplay=1 requests automatic playback, while mute=1 helps browsers permit it. controls=0 removes the standard YouTube controls from view, and playsinline=1 reduces the chance of a video taking over the entire screen on an iPhone. rel=0 limits the display of related videos after playback, though YouTube controls some recommendations independently.
Do not assume autoplay will work in every browser. A background video can be paused by browser settings, data-saving features, accessibility preferences or network conditions. Your page should still make sense if the iframe remains blank. Set a background image or solid colour behind it so visitors never see an empty hero area.
Log in to Weebly, open the relevant website and go to the page where the video will appear. Drag an Embed Code element into the page, preferably inside a full-width section. Select Edit Custom HTML, then paste the iframe wrapper and content into the element.
The HTML alone will place the video on the page, but it will not create a full-bleed background. Add the following CSS in the same Embed Code element beneath the HTML, or place it in your theme’s custom CSS area if your plan and theme allow that:
<style>
.yt-background {
position: relative;
min-height: 520px;
overflow: hidden;
background: #1b1b1b url("fallback-image.jpg") center / cover no-repeat;
}
.yt-background iframe {
position: absolute;
top: 50%;
left: 50%;
width: 100vw;
height: 56.25vw;
min-width: 177.78vh;
min-height: 100%;
transform: translate(-50%, -50%);
pointer-events: none;
}
.yt-background::after {
content: "";
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.35);
}
.hero-content {
position: relative;
z-index: 2;
min-height: 520px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40px 24px;
color: #fff;
text-align: center;
}
.hero-button {
display: inline-block;
padding: 12px 22px;
color: #fff;
background: #c4512d;
text-decoration: none;
border-radius: 4px;
}
</style>
The CSS uses a 16:9 ratio, which matches most YouTube videos. The large minimum width and height ensure that the video covers the hero even when the browser window is unusually wide or tall. Some of the image will be cropped, so keep faces, products and other focal points near the centre of the original footage.
The dark overlay is important for accessibility. White text over bright sand, sky or surf can become difficult to read, particularly on a sunny day in Adelaide or on a high-brightness phone. Adjust the overlay colour and opacity until the contrast is strong, but do not use such a heavy layer that the video loses its purpose.
A desktop hero height of around 500 pixels may look impressive, but it can occupy nearly the entire screen on a mobile phone. Add a media query to reduce the height on smaller displays:
<style>
@media screen and (max-width: 767px) {
.yt-background,
.hero-content {
min-height: 420px;
}
.yt-background iframe {
width: 180vw;
height: 101.25vw;
}
.hero-content {
padding: 32px 18px;
}
.hero-content h1 {
font-size: 32px;
line-height: 1.15;
}
}
</style>
The mobile version intentionally crops more of the video to preserve coverage. Test the result on both an iPhone and an Android device rather than relying only on the Weebly preview. Visitors in regional New South Wales or Queensland may have slower connections, and an oversized hero can delay the content they came to find.
Use a descriptive iframe title, meaningful heading text and sufficient colour contrast. If the video communicates essential information, provide that information in nearby text as well. A background should decorate the page, not become the only way visitors discover opening hours, prices or directions.
Do not place essential navigation inside an iframe or rely on the video as the only clickable area. The pointer-events: none rule makes the iframe sit behind the content, allowing buttons and links to remain usable. It also means visitors cannot pause the background directly. If the motion is important or potentially distracting, provide a visible pause control or use a static image instead.
Check the page with reduced-motion settings enabled if your theme or custom code supports that option. Some visitors experience discomfort from moving backgrounds. A considerate design can replace the video with the fallback image for those users:
@media (prefers-reduced-motion: reduce) {
.yt-background iframe {
display: none;
}
}
Publish the page temporarily or use Weebly’s preview mode to test the complete experience. Check the hero on desktop, tablet and mobile widths. Confirm that the heading remains visible, the button can be tapped, the video loops and the fallback background appears when the player is blocked.
If the video does not autoplay, confirm that mute=1, autoplay=1 and allow="autoplay" are present. If it plays once and stops, check that loop=1 and playlist=VIDEO_ID use the exact same ID. If related videos appear at the end, remember that YouTube’s current behaviour can limit how completely recommendations are hidden.
An empty frame often means the iframe URL has been copied incorrectly or the video owner has disabled embedding. Open the embed URL in a new browser tab to test it separately. Age restrictions, private videos and some copyright settings can also prevent playback. Choosing another permitted video is usually faster than trying to work around those restrictions.
Performance deserves attention because YouTube loads external scripts and images. Avoid putting several background videos on one page. Keep the hero at the top only when it supports the primary message, and lazy-load lower-page video content where possible. A visitor searching for a local plumber in Western Australia should see the phone number and service area quickly, even if the video is still loading.
The same principle applies to supporting tools and assets. If you are setting up a new domain email address for a small business, you can review two months of free email before connecting it to your contact forms. For visual checks while testing the finished page on different devices, QuickLens app can be useful when you need to inspect details quickly.
A background video should also fit the way the site earns business. An Australian café may want a short visual of its Fitzroy dining room, while a tour operator could show a calm Great Ocean Road scene. Neither needs a long cinematic clip that hides the booking button. Match the video to the visitor’s next action.
Copy the code into a Weebly Embed Code element, replace the video ID, add a suitable fallback image and test the page at several screen sizes. With restrained motion, readable content and a reliable mobile layout, your YouTube background can give the site atmosphere without making it slower or harder to use.
Add a clean countdown timer to your Weebly site, created by Marius Stanciu.
A comparison of free and paid email accounts and the advantages of using a domain-based custom email.
Instructions on setting a free custom email address for your website within Weebly.
Configure your Weebly RSS feed so visitors can subscribe and receive email updates.
Details on a promotional offer for two months of free email hosting from Namecheap.
Subscribe for regular email updates and get access to new Weebly tips and tutorials.