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 sticky navigation bar stays available as visitors move down a page, so key pages, contact details and shopping actions remain one click away. In Weebly, the effect is most useful on long landing pages, service pages and online stores, where a standard header can disappear before a reader reaches the footer. It creates a steadier browsing experience without rebuilding the rest of your site.
Most Weebly themes do not expose a sticky-navigation switch, but a small site-wide code change can add one. The method below uses the navigation area already published by your theme, then activates it after the original header moves out of view. It is reversible, works with responsive menus and gives you control over colour, spacing and behaviour rather than locking the design inside a template.
The main benefit is continuity. A visitor reading about a service in Brisbane can reach booking, directions or an about page without scrolling back to the top. The bar also keeps a shop’s Bag, Help and Contact links visible, which reduces uncertainty near a purchase decision.
For a long blog post, a persistent menu works like a running index. Readers can move to a services section, an article archive or a contact form without losing their place. This is particularly handy on mobile screens, where reaching the top of a page can take several swipes and a tap on the browser’s reload button is not an acceptable substitute for navigation.
Stickiness should still feel natural. If the bar is too tall, opaque or brightly coloured, it can dominate the content and cover the heading a visitor was reading. Aim for a compact strip that appears only after the original navigation leaves the viewport, while keeping links large enough to tap and labels short enough to scan.
Start with Weebly’s normal site structure. Open Edit Site > Navigation, turn on the navigation area if it is hidden, and choose the pages that deserve permanent access. Check the order on both desktop and mobile, because Weebly can organise responsive menus differently. A useful sequence often moves from Home to core services, then About, Blog and Contact.
Next, identify the element that contains the menu. In a desktop browser, right-click the navigation and choose Inspect. Weebly themes commonly use a class such as .header .nav-wrapper, .nav or .wsite-menu-item, but the names vary. Target the wrapper around the complete list, not each link, because fixing every item separately would pull the links apart.
Plan where the code will live before changing anything. The site-wide CSS or custom-code area under Design is preferable, since a single change then reaches every page. If your plan does not expose that area, a Custom HTML element can hold the same code, although it must be placed on each page. If the bar needs a special typeface, add a Google Font explains a theme-compatible custom CSS method.
The script below uses the same visual idea as position: sticky: it measures where the original navigation ends and adds a fixed class only after the visitor scrolls past that point. A small placeholder preserves the space taken by the menu, preventing the page from jumping when the class is applied. Paste the block into the site-wide header code, then adjust the selector if your theme uses a different class.
<style>
.sticky-nav {
position: fixed !important;
top: 0 !important;
left: 0 !important;
right: 0 !important;
z-index: 10000;
width: 100% !important;
max-width: none !important;
box-sizing: border-box;
padding: 12px 20px;
background-color: #ffffff;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.sticky-nav .nav {
width: 100%;
max-width: 980px;
margin: 0 auto;
background: transparent;
}
</style>
<script>
document.addEventListener("DOMContentLoaded", function () {
var nav = document.querySelector(".header .nav-wrapper");
if (!nav) {
return;
}
var placeholder = null;
var stuck = false;
var trigger = nav.getBoundingClientRect().bottom + window.scrollY;
function updateStickyNav() {
if (!stuck && window.scrollY > trigger) {
placeholder = document.createElement("div");
placeholder.style.height = nav.offsetHeight + "px";
placeholder.setAttribute("aria-hidden", "true");
nav.parentNode.insertBefore(placeholder, nav);
nav.classList.add("sticky-nav");
stuck = true;
} else if (stuck && window.scrollY <= trigger) {
nav.classList.remove("sticky-nav");
if (placeholder && placeholder.parentNode) {
placeholder.parentNode.removeChild(placeholder);
}
placeholder = null;
stuck = false;
}
}
window.addEventListener("scroll", updateStickyNav, {
passive: true
});
updateStickyNav();
});
</script>
After pasting, replace .header .nav-wrapper with the selector you found in Inspect. The white background and shadow are deliberate defaults; change them to match your theme, especially if the original header is transparent. If the logo should travel with the links, select the smallest parent that contains both, but do not select a wrapper that also holds the full hero image.
For a navigation built in a Custom HTML element near the top of the page, CSS position: sticky; top: 0; is a lighter alternative. The scripted version is safer for many standard Weebly headers because their navigation sits inside a banner container that limits native sticky movement. Keep one method at a time while testing so two versions cannot appear together.
Australian audiences expect familiar language and commercial details. Use Australian spelling such as “colour”, “favourites” and “centre”, display prices in Australian dollars, and state whether GST is included. That small consistency reassures shoppers comparing a Sydney florist, a Melbourne event supplier or a Brisbane maker with local alternatives.
Think about busy travel days as well as desk-based browsing. A passenger checking a Sydney ferry timetable or looking for a café near Melbourne’s laneways may open the site on a phone while moving between platforms. Keep the primary call to action short, such as “Call”, “Book” or “Get directions”, and make sure it works on a small touch screen.
Regional and remote areas add another practical consideration. Some visitors in regional Australia or the Northern Territory may rely on a slower mobile connection than customers in major cities, so the sticky bar should be lightweight and the site should avoid large background images inside it. Test the experience on an ordinary mobile connection, not only fast office Wi-Fi.
Mobile behaviour needs a deliberate test. Weebly’s menu button may open a drop-down below the navigation, so the fixed layer must sit above page content without hiding that panel. Scroll far enough to activate the bar, open the menu, close it and tap several links. Repeat in portrait and landscape on iPhone Safari and Android Chrome if your audience uses both.
Keyboard users also need a clear path through the links. Check that the menu can be reached with the Tab key, that the focus outline remains visible against the new background, and that a focused item is not covered by the bar. Maintain strong colour contrast, aiming for at least 4.5:1 for normal text, and use touch targets of roughly 44 by 44 CSS pixels.
Also test a narrow screen, a zoomed page and a long menu label. Fixed positioning can create horizontal scrolling if the navigation has a hard-coded width. If that occurs, add max-width: 100% and box-sizing: border-box to the sticky class, or reduce the number of permanent links. The menu should never force the visitor sideways.
The script handles the basic behaviour, while design choices determine whether the feature feels useful. Before adding more items, review the information people genuinely need while reading. Keep the bar aligned with the site’s existing buttons and colours rather than treating it as a separate mini-site.
After making these adjustments, clear the browser cache and reload the site from the published address, not only the editor preview. Compare the sticky state with the normal header and confirm that no page section sits beneath it. These small checks protect the polish gained from the new navigation behaviour.
Save a copy or duplicate of the current theme before publishing the code, then test on a draft page with a long article and a product listing. Publish only after the bar appears at the correct point, disappears cleanly when scrolling back and leaves the mobile menu usable. A quick test on a real phone is more valuable than relying entirely on a desktop preview.
Add the bar to your maintenance routine. Review it whenever pages, navigation labels or theme colours change, and remove the code if a future Weebly release provides a native sticky option. The selector is the part most likely to need attention, so keep a note of the class you selected and where the code lives.
Ready to put it into practice? Open the Weebly editor, save the current version, and add the block to a draft page today; browse more practical site-customisation guides on My Weebly Tricks when you are ready to publish.
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.