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 small hover tooltip can make a crowded Weebly page easier to understand without adding another block of visible copy. Attach it to an icon, underlined phrase, or compact button, then reveal a short explanation when someone hovers, focuses, or taps it. This is useful for shipping terms, product specifications, abbreviations, and guidance that supports the main content rather than replacing it.
The best custom tooltip is compact, readable, and dependable on Australian mobile devices. Many people in Melbourne, Sydney, Brisbane, and other cities check websites on a phone while travelling on public transport. A tooltip should reward attention without demanding it, and its information should remain available through keyboard navigation, touch controls, and assistive technology. The example below uses light HTML and CSS, with optional JavaScript for touch behaviour, so the page stays quick and useful without a large plugin or slow-loading widget.
Start by deciding what information belongs in the bubble. A tooltip should clarify one nearby item, such as what a shopping basket icon does or whether a form field accepts an Australian mobile number. Keep the wording to a sentence or two. If visitors need to compare several options, read a long policy, or complete an action, publish that content on the page instead of hiding it in a hover state.
A CSS-only tooltip is the simplest option for Weebly. It appears when the pointer enters a wrapper and disappears when the pointer leaves; :focus-within also reveals it when a keyboard user reaches the trigger. This works well for short, static notes and needs no third-party app. Give the trigger a real text label or accessible name, though, rather than applying a tooltip to an unlabelled image.
Use JavaScript when you need delayed opening, tap-to-toggle behaviour, or a bubble that can be dismissed with Escape. Avoid making JavaScript essential for reading the underlying page, because some visitors block scripts and many phones do not provide a dependable hover state. Progressive enhancement keeps the markup and CSS working first, then adds behaviour where it is useful.
Visual consistency matters as much as function. Match the bubble to your brand, but keep enough contrast between text and background for readability. If the wider page design is still unsettled, the Pimsandra design options can offer a useful visual direction before you set colours, borders, and spacing. Australian English is a sensible default here: use “customise,” “favourites,” and familiar wording rather than translating an overseas interface phrase for no reason.
In the Weebly editor, open the page where the tooltip belongs and add an Embed or HTML section. Paste the following example into its code area, then replace the bubble copy with your own message. The trigger is a button because buttons give keyboard and touch users a clear focus target.
<div class="weebly-tip">
<button
type="button"
class="weebly-tip__trigger"
aria-describedby="shipping-tip"
>
Shipping details
</button>
<span
class="weebly-tip__bubble"
id="shipping-tip"
role="tooltip"
>
Orders over $75 ship free across Australia.
</span>
</div>
The wrapper controls the hover area, the button is the control people interact with, and the span holds the message. The aria-describedby connection tells assistive technology that the bubble describes the button. If you place several tooltips on one page, give every bubble a unique id and update the matching aria-describedby value; duplicate IDs can produce confusing announcements.
Save the section and preview it before styling. If you are new to the editor, the Weebly customisation guides explain where embeds and editor controls fit together. For a product example, “Orders over $75 ship free across Australia” fits an Australian store’s free-delivery threshold. If the bubble explains a price, quote it in Australian dollars and state whether GST is included rather than mixing currencies or tax wording.
If the same note is needed in several places, copy the embed into each page rather than trying to reuse one ID. Keep the classes identical so the CSS applies everywhere, but give every bubble on the same page a unique identifier.
Open your site’s design or theme settings and find the custom CSS editor, often labelled “Edit CSS.” Paste the rules below there if you want the tooltip available throughout the site, or place the same CSS in an embed section for a page-specific experiment. Publish the site after saving because the live page may not reflect CSS changes in the editor preview.
.weebly-tip {
position: relative;
display: inline-block;
}
.weebly-tip__trigger {
border: 0;
border-bottom: 1px dotted currentColor;
padding: 0;
background: transparent;
color: inherit;
font: inherit;
cursor: help;
}
.weebly-tip__bubble {
position: absolute;
z-index: 1000;
left: 50%;
bottom: calc(100% + 10px);
width: max-content;
max-width: min(280px, calc(100vw - 32px));
padding: 0.7rem 0.85rem;
border-radius: 6px;
background: #20252b;
color: #ffffff;
font-size: 0.875rem;
line-height: 1.45;
text-align: left;
opacity: 0;
visibility: hidden;
pointer-events: none;
transform: translate(-50%, 6px);
transition:
opacity 0.18s ease,
transform 0.18s ease,
visibility 0s linear 0.18s;
}
.weebly-tip__bubble::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
border: 6px solid transparent;
border-top-color: #20252b;
transform: translateX(-50%);
}
.weebly-tip:hover .weebly-tip__bubble,
.weebly-tip:focus-within .weebly-tip__bubble,
.weebly-tip.is-visible .weebly-tip__bubble {
opacity: 1;
visibility: visible;
transform: translate(-50%, 0);
transition:
opacity 0.18s ease,
transform 0.18s ease,
visibility 0s;
}
.weebly-tip.is-dismissed .weebly-tip__bubble {
opacity: 0;
visibility: hidden;
}
.weebly-tip__trigger:focus-visible {
outline: 3px solid currentColor;
outline-offset: 3px;
}
The colours are only examples: change the dark background, white text, focus ring, radius, and font size to suit your palette. Check that the bubble is not cut off by a parent with overflow: hidden, and keep it away from edges that matter on a narrow screen. A phone may show a bubble wider than the visible content area, so the max-width rule is useful even when the trigger itself is tiny.
Do not rely on a very pale bubble with grey text, and avoid animations long enough to make the message feel sluggish. People checking products during a lunch break should not have to wait for an elaborate effect. The outline also provides a strong keyboard focus cue without changing the site’s main colour scheme.
Pure CSS handles pointer and keyboard focus well on most desktops, but a phone tap needs an explicit open-and-close action. Add the following script once to the same embed code as the HTML, below the wrapper, or place it in a separate Embed section after all tooltip markup. The script enhances the existing CSS tooltip rather than carrying the content.
document.querySelectorAll(".weebly-tip").forEach(function (tip) {
const trigger = tip.querySelector(".weebly-tip__trigger");
const canHover = window.matchMedia(
"(hover: hover) and (pointer: fine)"
);
function showTip() {
tip.classList.remove("is-dismissed");
tip.classList.add("is-visible");
}
function hideTip() {
tip.classList.remove("is-visible");
tip.classList.add("is-dismissed");
}
trigger.addEventListener("mouseenter", showTip);
trigger.addEventListener("mouseleave", hideTip);
trigger.addEventListener("focus", function () {
if (canHover.matches) showTip();
});
trigger.addEventListener("click", function (event) {
event.stopPropagation();
if (canHover.matches) return;
if (tip.classList.contains("is-visible")) {
hideTip();
} else {
showTip();
}
});
document.addEventListener("click", function (event) {
if (!tip.contains(event.target)) hideTip();
});
document.addEventListener("keydown", function (event) {
if (event.key === "Escape") hideTip();
});
});
The is-visible class mirrors what the hover and focus rules already do in CSS. The script lets a phone user tap the trigger, dismiss the bubble by tapping elsewhere, or close it with Escape. Keep the bubble text brief and non-interactive; if it needs a link or form, publish that information directly on the page so touch users are not forced to chase a small floating target.
Timing can be part of the message. If a bubble explains opening hours, write “9 am to 5 pm AEDT” only when that is correct and update it when daylight saving changes; otherwise show a link to a page with current trading hours. For delivery estimates, name the service level rather than promising a fixed arrival date.
The is-dismissed class gives the script an explicit closed state. This matters after Escape because the trigger may still hold keyboard focus; without that override, the :focus-within rule would immediately reveal the bubble again. A tooltip can also point towards useful interaction. If it sits beside a comments invitation, the visitor engagement guide offers ideas for making that invitation clear.
Preview the tooltip on a desktop, a tablet, and a phone. Open it with a mouse, tab through the page, press Enter where needed, and check that Escape closes it. Then zoom the browser to 200 per cent and look for clipped text, a bubble hidden behind another element, or a tooltip that covers the trigger. Test several page widths because a centred bubble can sit close to the edge of a narrow Weebly column.
Useful copy to try
Pre-publish checks
Treat the tooltip as an enhancement to the page rather than the only route to its information. If you track which tooltips receive clicks, use a privacy-conscious analytics tool and handle data under the Privacy Act 1988 and Australian Privacy Principles where they apply. Do not place personal details, account numbers, or sensitive form values inside a bubble.
Do a final arvo check on the published page, including one slower connection and one common phone size. Once it behaves correctly, reuse the pattern for labels, specifications, and compact guidance. Create your first tooltip today: open the Weebly editor, add the markup, apply the CSS, and publish a test page.
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.