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 masonry layout places cards, images or blog previews into flowing columns with different heights, creating the informal arrangement seen on Pinterest-style websites. It can make a portfolio, recipe archive, travel journal or product gallery feel denser without forcing every item into a rigid row. For Weebly users, CSS Grid provides a flexible foundation that works well with the platform’s existing content blocks.
Weebly does not include a dedicated masonry widget in every editor theme, but you can create a similar result with custom classes and a small amount of CSS. The method below is suited to independent site owners who want a polished layout without changing their hosting or moving to another content management system. It also keeps mobile visitors in mind, which matters for Australian audiences browsing on phones in Sydney cafés, Melbourne trains or regional areas with variable connection speeds.
Traditional rows make every item line up with the tallest card in that row. If one article has a long title or a portrait image, the empty space beneath neighbouring cards can look awkward. A masonry-style grid reduces that visual gap by allowing selected cards to occupy extra vertical tracks.
CSS Grid is useful because it gives you control over columns, spacing and breakpoints in one place. You can define two or three columns on larger screens, collapse to one column on small phones and use named classes to give certain cards a taller footprint. This approach is predictable, lightweight and easier to maintain than a large third-party gallery script.
The layout can suit an Australian small business just as well as a personal blog. A Brisbane photographer might use it for beach and event galleries, while a Perth maker could display product images with different proportions. Before adding code, it is worth reviewing a general web design resource for broader guidance on responsive structure and browser behaviour.
Start by creating a group of similar items in Weebly. The easiest options are image blocks, blog post summaries, product cards or text-and-image sections. A uniform structure produces cleaner results, so try to give each item the same outer class, such as masonry-card, even if the images inside have different dimensions.
In the Weebly editor, add an Embed Code element where the gallery should appear, then insert a wrapper and several cards. A basic structure might look like this:
<div class="masonry-grid">
<article class="masonry-card masonry-card-tall">
<img src="image-one.jpg" alt="Coastal landscape at sunset">
<h3>Coastal Walks</h3>
<p>Notes and images from recent trips.</p>
</article>
<article class="masonry-card">
<img src="image-two.jpg" alt="Ceramic cups on a studio shelf">
<h3>Studio Work</h3>
<p>Small-batch pieces and behind-the-scenes posts.</p>
</article>
</div>
Replace the image paths, headings and descriptions with your own content. Use meaningful alternative text rather than repeating keywords. If you are working with Weebly blog content, you may need to create the visual card manually or place the custom gallery above or below the standard blog feed.
Place the CSS in Weebly’s theme editor under Theme > Edit HTML/CSS, usually in the main stylesheet. You can also place styles in an Embed Code element between <style> tags, although the theme stylesheet is easier to manage when the design is used on several pages.
.masonry-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-auto-rows: 8px;
gap: 20px;
align-items: start;
}
.masonry-card {
grid-row: span 34;
min-width: 0;
overflow: hidden;
border-radius: 8px;
background: #ffffff;
box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}
.masonry-card-tall {
grid-row: span 46;
}
.masonry-card img {
display: block;
width: 100%;
height: auto;
}
.masonry-card h3,
.masonry-card p {
margin: 14px 18px;
}
The small grid-auto-rows value creates the measuring units, while grid-row: span determines how tall each card becomes. It is a controlled masonry effect rather than a fully automatic layout engine. A tall image or longer description may require a larger span value, so preview the page after adding real content.
Avoid setting a fixed height on the image unless you want every image cropped. height: auto preserves the original proportions, which is especially useful for galleries containing a mixture of portrait and landscape photographs. For commercial websites, compressed WebP or appropriately sized JPEG files will also help pages load faster over mobile networks.
A three-column layout can work on a desktop monitor, but it may become cramped on a 13-inch laptop or a tablet in portrait mode. Responsive CSS should reduce the number of columns before cards become difficult to read. The following rules provide a practical starting point:
@media (max-width: 900px) {
.masonry-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
}
.masonry-card,
.masonry-card-tall {
grid-row: span 38;
}
}
@media (max-width: 600px) {
.masonry-grid {
grid-template-columns: 1fr;
gap: 14px;
}
.masonry-card,
.masonry-card-tall {
grid-row: auto;
}
}
On phones, a single column is often the safest choice because it avoids tiny text and narrow tap targets. This is particularly important for visitors comparing services or products on an iPhone while travelling between Adelaide suburbs or waiting for a tram in Melbourne. If your cards are short and image-led, two columns may still work at around 600 pixels, but test the actual text rather than relying on a device specification.
You can also change the card padding, font size and heading spacing at the same breakpoints. Keep the layout consistent with your existing Weebly theme so the custom gallery feels like part of the website rather than a separate widget.
There are several ways to create variation. Use masonry-card-tall for a feature article, a portrait image or a card with additional copy. You could add a shorter class for small announcements, but avoid making every item a different height. Repeated height patterns help visitors scan the page and make the design feel intentional.
.masonry-card-short {
grid-row: span 26;
}
.masonry-card-feature {
grid-column: span 2;
grid-row: span 42;
}
@media (max-width: 900px) {
.masonry-card-feature {
grid-column: span 2;
}
}
@media (max-width: 600px) {
.masonry-card-feature {
grid-column: span 1;
grid-row: auto;
}
}
A feature card spanning two columns can draw attention to a seasonal promotion, a new service or a major blog post. For an Australian retailer, that could be a summer collection before the Christmas shopping period or a local delivery announcement for customers in Newcastle and the Hunter region. Use prominent cards sparingly so the page does not become visually noisy.
If you want a genuinely automatic masonry result based on each card’s content height, CSS Grid alone has limitations in widely supported browsers. Experimental masonry properties exist in some browser implementations, but they are not a dependable choice for a public Weebly site. Explicit spans are more reliable, while a small JavaScript enhancement can measure cards when a project truly needs automatic placement.
Visual effects should never interfere with navigation. Make sure each card has a clear heading, readable contrast and a link that is easy to tap. A hover effect can add polish on desktop, but it should not be the only indication that an item is clickable because touchscreens do not have a conventional hover state.
.masonry-card a {
color: #164f63;
text-decoration-thickness: 2px;
text-underline-offset: 3px;
}
.masonry-card a:hover,
.masonry-card a:focus-visible {
color: #9b3d25;
}
.masonry-card:focus-within {
outline: 3px solid rgba(22, 79, 99, 0.35);
outline-offset: 4px;
}
Keep image alternative text descriptive and avoid placing important information only inside an image. Visitors using keyboard navigation should be able to move through cards in a sensible order. If the visual order becomes complicated through spans, check the source order in the HTML and ensure the first items are still the most useful ones.
A floating navigation control can complement a long gallery. If your page contains many cards, you can add a back-to-top button so users can return to the menu without repeatedly swiping. Keep it small, give it an accessible label and check that it does not cover cookie notices or important mobile controls.
Masonry layouts often rely on several images, so performance deserves attention before the page goes live. Resize photos to the largest display size you actually need, compress them, and avoid uploading a 5 MB camera original when a 250 KB WebP file will look the same in the browser. Add lazy loading where appropriate, while keeping the first visible images available quickly.
The CSS itself is usually very light, but shadows, large background images and animation can add unnecessary work. Use moderate shadows and disable motion for visitors who have requested reduced movement:
@media (prefers-reduced-motion: reduce) {
.masonry-card,
.masonry-card img {
transition: none !important;
animation: none !important;
}
}
If the CSS appears to do nothing, inspect the class names first. The class in the HTML must match the selector in the stylesheet exactly, including hyphens and spelling. Weebly themes may also contain more specific rules that override your custom code. In that case, place the custom stylesheet later in the theme file or increase specificity carefully rather than adding !important everywhere.
Unexpected gaps often come from a span value that is too small for the card’s text, image or padding. Increase the relevant row span gradually, then test again. If cards overlap, check for fixed heights, negative margins or conflicting positioning rules inherited from the theme. Browser caching may also delay visible changes, so save the theme, publish a test page and refresh in a private window.
Before publishing to a live domain, test the page in current versions of Chrome, Safari and Edge. Look at the layout on both a fast desktop connection and a mobile connection. Australian visitors can come from major metropolitan areas as well as regional towns, so a design that loads acceptably on a home NBN connection should still be usable on a slower mobile signal.
CSS Grid gives Weebly owners a practical way to create an attractive masonry-style gallery without installing a heavy plugin. Begin with a clear card structure, use explicit row spans for controlled variation, add responsive breakpoints and optimise every image. Paste the styles into a duplicate or test page first, review the result on real devices, then publish the finished layout when the spacing, accessibility and performance are ready.
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.