Key Takeaways
- Zebra striping alternates contrasting background colors on rows or columns so readers can track dense data without losing their place.
- The same idea now shapes social drinking, where people alternate alcoholic and non-alcoholic drinks round for round to keep their pace.
- CSS zebra striping usually relies on the :nth-child() pseudo-class, with JavaScript re-striping when rows are filtered or hidden.
- Accessible tables still need correct HTML structure, clear headers, and sufficient contrast, because visual striping only supports comprehension.
- Little Saints creates zero-sugar, functional non-alcoholic cocktails and spirits that fit naturally into zebra-striped evenings.
Zebra Striping In Interfaces And Evenings
Zebra striping follows one core idea: alternating elements make long sequences easier to follow. In interfaces, that sequence is rows or columns in a table or list. In social settings, that sequence is rounds of drinks across an evening.
The examples below group technical uses first, then the social drinking behavior that now shares the name.
-
Even-Row Table Striping In CSS, the baseline implementation that applies a light background to every second body row using
tbody tr:nth-child(even). - Odd-Row Table Striping In CSS, the inverse pattern that shades rows 1, 3, 5 and leaves even rows at the default background.
-
Vertical Or Column Striping, which applies
:nth-childtotdelements instead oftrso alternating columns carry the stripe. - Hover-State Striping, which combines row stripes with a hover highlight so the active row stands out even on top of a stripe color.
- Hidden-Row Striping Fix, which keeps alternation intact after filtering or collapsing rows by re-striping visible rows with JavaScript.
- Zebra Striping In Excel And Spreadsheets, where banded rows and columns appear through table formatting, conditional formatting, or built-in styles.
-
Zebra Striping In Div-Based Lists And Cards, which applies the same
:nth-childpattern to non-table markup such as result lists or card grids. - Zebra Striping Your Evening, where a cocktail alternates with a non-alcoholic drink, round for round, across a night out.
Why Designers And Drinkers Call It Zebra Striping
Both uses of the term grow from the same visual metaphor. A zebra’s coat shows a repeating alternation of black and white bands, with neither color dominating, and the pattern runs the full length of the animal. In a data table, the stripe appears as a shaded row followed by an unshaded row, repeated for as many rows as the table contains. In a night out, the stripe appears as an alcoholic drink followed by a non-alcoholic one, repeated for as many rounds as the evening runs.
The UI meaning has appeared since the early days of computing. Design+Encyclopedia traces zebra striping in data displays back to applications such as the original UNIX operating system and Lotus 1-2-3 spreadsheet software. The drinking meaning is newer. The phrase rose in the UK around 2024, largely off the back of a KAM Insight report, and grew sharply as the non-alcoholic category expanded.
Both patterns exist to help you keep your place. A striped table row tells the eye where one record ends and the next begins. A non-alcoholic round tells the evening where one drink ends and the next begins.
How To Zebra Stripe A Table In CSS
The MDN Styling Tables guide defines zebra striping as alternating row colors that make table data easier to parse and read. The common implementation uses the CSS :nth-child() pseudo-class, which selects elements by their position among siblings.
Row Striping On Even Rows
Most implementations scope the stripe to tbody tr so the header row in <thead> and any totals row in <tfoot> stay unchanged:
tbody tr:nth-child(even) { background-color: #f5f5f5; }
This rule renders rows 2, 4, 6 and so on with a light gray background, while odd rows stay at the default. Scoping to tbody tr rather than a bare tr selector follows MDN’s recommendation.
Row Striping On Odd Rows
Declaring only the odd rule leaves even rows at the default background, which works well when the default is already a clean white:
tbody tr:nth-child(odd) { background-color: #f5f5f5; }
The choice between odd and even is a visual preference. Even-row striping keeps the first data row unshaded. Odd-row striping gives that first row the stripe. Either approach works when applied consistently.
The :nth-child() pseudo-class also accepts An+B formulas. 2n+1 matches odd elements, and 2n matches even elements. Formulas such as 3n select every third element, which enables repeating patterns beyond simple two-color stripes, as the CodeShack CSS reference explains.
Vertical Or Column Striping
Column striping helps readers compare values down a column. Instead of targeting tr elements, the selector targets td and th by their position within each row:
tbody td:nth-child(even), thead th:nth-child(even) { background-color: #f0f4ff; }
This pattern shades every second column across all rows. Pricing grids and schedule tables often benefit from this approach.
Hover States Combined With Striping
A hover highlight supports tracking across wide tables on desktop. The stripe and the hover color need enough separation so the hover remains visible without clashing. Hyring’s CSS table styling guide suggests keeping both colors subtle:
tbody tr:nth-child(even) { background-color: #f5f5f5; } tbody tr:hover { background-color: #e8f5ee; }
The :hover selector overrides the stripe on the active row in this context. The stripe color and hover color should differ enough that the transition reads clearly. Derek Giordano at Ultimate Design Tools recommends very low opacity values for dark themes, as low as 2–4 percent white, so the stripe supports navigation instead of dominating the design. Hover highlighting does not affect touch devices, so designers should pair it with other wayfinding cues, as Phoenix Studio’s August 2026 data table guide notes.
The Hidden-Row Problem
Interactive tables often lose their stripes after filtering. The :nth-child() pseudo-class counts an element’s position among all element siblings in the DOM, not only visible elements. When rows are hidden with display: none, the remaining visible rows may all be odd-numbered or all even-numbered, which creates a solid block of one color.
A JavaScript re-striping step solves this. After filtering, iterate over visible rows and toggle a class:
document.querySelectorAll('tbody tr:not([hidden])') .forEach((row, index) => { row.classList.toggle('stripe', index % 2 === 0); });
The CSS then targets the class instead of :nth-child:
tbody tr.stripe { background-color: #f5f5f5; }
This approach re-numbers visible rows after each filter operation and keeps stripes consistent.
Zebra Striping In Excel And Spreadsheets
Excel applies zebra striping through its Table Styles feature. Selecting a range and formatting it as a table using Insert → Table enables banded rows by default. The Table Design tab exposes checkboxes for Banded Rows and Banded Columns independently, so vertical striping can appear without row striping. Custom colors live in the Table Style Options panel. For ranges that are not formatted as tables, conditional formatting with a formula such as =MOD(ROW(),2)=0 applies a fill to every even row across a selection.
Zebra Striping In Lists And Cards
The same :nth-child pattern applies to any repeating element, not only table rows. A div-based list of results can be striped with:
.results-list div:nth-child(odd) { background-color: #f8f9fa; } .results-list div:nth-child(even) { background-color: #ffffff; }
The CodeShack CSS reference lists this as a canonical use case alongside table striping. The same logic applies to card grids, list items, and any repeating container where readers benefit from a visual separator between entries.
The table below compares three main CSS striping approaches:
| Approach | Selector | Scope | Best Use |
|---|---|---|---|
| Even-row striping | tbody tr:nth-child(even) |
Body rows only, header unaffected | Default for most data tables |
| Odd-row striping | tbody tr:nth-child(odd) |
Body rows only, header unaffected | Tables where the first row should carry the stripe |
| Column striping | td:nth-child(even), th:nth-child(even) |
All rows, applied per cell | Tables where column comparison matters more than row tracking |
MDN’s HTML table reference uses tbody > tr:nth-of-type(even) with a light gray-blue stripe of rgb(237 238 242) as its worked example, paired with a distinct header background. Phoenix Studio’s August 2026 data table design guide notes that zebra striping helps most when rows are tall or when a table has more than about six columns. Valiotti’s May 2026 table design guide adds that striping becomes unhelpful in tables with five rows or fewer, in tables using heavy color coding, and in tables where rows contain multiple lines of text.
Accessibility And Dark Mode For Zebra-Striped Tables
Zebra striping supports visual scanning but does not change table semantics. Accessibility Build’s guide to accessible data tables explains that screen readers rely on semantic table markup, especially <th> cells with explicit scope attributes, to connect headers and data. A table with alternating row colors but no proper <th> elements reads numbers with no column or row context.
Where borders or zebra striping act as the only visual separators between rows, those boundaries must meet a 3:1 non-text contrast ratio against their background. This requirement comes from WCAG 2.2 success criterion 1.4.11 Non-text Contrast (Level AA), as documented by Accessibility Build. A stripe strong enough to meet 3:1 can quickly dominate the layout, so Valiotti advises that if the reader notices the stripe more than the data, the stripe is too strong.
In dark mode, the stripe should sit as a slightly lighter shade of the dark background rather than a sharply different tone. Derek Giordano at Ultimate Design Tools recommends very low opacity whites, around 2–4 percent, so the stripe guides navigation without glare.
The WCAGrules.com accessible tables guide notes that striping never replaces proper table semantics. It advises header cells to carry an explicit scope attribute such as scope="col" or scope="row", and describes scope as W3C good practice. A <caption> element, while not strictly required by WCAG, gives a fast accessibility win because screen readers announce it when users land on the table.
Colorblind users may not perceive the contrast between stripe and base row, depending on the colors. When semantic markup is correct, this outcome still works, because the stripe remains a convenience rather than the only way to parse the table.
How To Zebra Stripe Your Evening With Little Saints
Zebra striping in a social drinking context means alternating alcoholic and non-alcoholic drinks across a single evening. One round includes alcohol, the next round does not, and the pattern continues for as long as the night runs. This pattern reflects ordinary social behavior that includes non-alcoholic rounds. The person zebra striping still sits at the table, still holds a drink, and still participates in the round.
Researchers now track this behavior. NIQ’s From Value To Vibe (January 2026) reports that 47 percent of on-premise visitors mix alcoholic and non-alcoholic options in the same occasion, and 93 percent of non-alcohol buyers also purchase alcohol. The non-alcoholic drink joins the same check, from the same person, on the same night.
Most zebra stripers face a choice between a non-alcoholic drink and nothing, because later rounds often default to soda or water. The non-alcoholic category exists to fill that gap with drinks that feel worth ordering.
Little Saints focuses on that exact moment. The non-alcoholic cocktails, including Classic Spritz, Hugo Spritz, and Classic Margarita, carry zero sugar, five calories, and a functional mushroom and botanical blend in every can. The non-alcoholic spirits St. Ember, St. Oak, and St. Juniper use oil-based craft extracts rather than flavored water, so two ounces replace two ounces in any classic cocktail spec. A zebra striper making a margarita with St. Ember keeps the same recipe, the same glass, and the same garnish as the previous round.
The functional blend of organic Reishi, organic Lion’s Mane, Damiana, and botanical terpenes makes the trade feel worthwhile. Every extract carries a minimum of 70 percent beta glucan, the fraction of the mushroom associated with adaptogenic properties, documented by supplier certificates of analysis. The label states a 100 mg dose per serving. At 70 percent beta glucan, the extract can reach up to 700 times the concentration of a whole mushroom at around 0.1 percent beta glucan, and roughly 70 times the concentration of a dried, ground mushroom at around 1 percent. Little Saints calls the effect the Little Saints Lift, a sense of clarity and ease that gives the non-alcoholic round more to offer than hydration.
The spirits line suits zebra stripers who already mix drinks at home. St. Ember mixes like a tequila or a mezcal. St. Juniper mixes like a gin. St. Oak captures the notes of an oak-aged whiskey and works in old fashioneds, manhattans, and other brown-liquor builds. St. Oak earned Best NA Spirit of 2025 from the BevNET Spirit Awards. Because the spirits rely on oil-based extracts, they hold up in a cocktail build without over-pouring, so a bottle of St. Ember pours as far as the bottle it replaces.
Little Saints ships directly to consumers in all 50 states. The brand appears in Sprouts nationwide, Whole Foods in California and Florida, Fresh Thyme across the Midwest, and ABC Liquors in Florida, with on-premise placement concentrated in A- and B-tier bars and restaurants.
These statements have not been evaluated by the Food and Drug Administration. This product is not intended to diagnose, treat, cure, or prevent any disease.
Find Your Zebra Striping Drink
Frequently Asked Questions (FAQ)
What Is Zebra Striping?
Zebra striping has two meanings that share the same underlying pattern. In UI and data-table design, it means applying alternating background colors to rows or columns in a table so the eye can track dense data without losing its place. In social drinking, it means alternating alcoholic and non-alcoholic drinks across a single evening, one for one, to keep your place in the night without stepping out of it.
Why Is It Called Zebra Striping?
The name comes from a zebra’s coat, which shows alternating black and white bands with neither color dominating. In a data table, the stripe appears as a shaded row followed by an unshaded row. In a night out, the stripe appears as an alcoholic drink followed by a non-alcoholic one. Both patterns count as zebra striping because both repeat the same alternation in different contexts.
Does Zebra Striping Help Readability?
Zebra striping improves readability in many tables. It helps most when rows are tall or when a table has more than about six columns, because the alternating color gives the eye a track to follow across wide rows. It becomes less useful in small tables of five rows or fewer, in tables that already use heavy color coding for status, and in tables where rows contain multiple lines of text. A single hairline between rows often provides a lighter-weight alternative with similar benefits. In every case, the stripe should stay low-contrast so readers focus on the data.
How Do I Handle Hidden Rows In A Zebra-Striped Table?
As explained in the hidden-row section above, :nth-child() counts all sibling elements, so hiding rows breaks the visual alternation. A JavaScript re-striping step that toggles a stripe class on visible rows restores the pattern and keeps stripes consistent after filtering.
How Do I Zebra Stripe In Excel?
Select the range and format it as a table using Insert → Table. Excel applies banded rows by default. The Table Design tab exposes checkboxes for Banded Rows and Banded Columns independently, so vertical striping can appear without row striping. Custom colors live in the Table Style Options panel. For ranges not formatted as tables, conditional formatting with a formula such as =MOD(ROW(),2)=0 applies a fill to every even row across a selection.
What Is The Zebra Striping Drinking Trend?
Zebra striping in drinking means alternating alcoholic and non-alcoholic drinks across a single evening, one round alcoholic and the next non-alcoholic, repeated for as many rounds as the night runs. As mentioned earlier, NIQ reports that 47 percent of on-premise visitors mix alcoholic and non-alcoholic options in the same occasion. The behavior reflects social drinking that includes non-alcoholic rounds, and the person doing it remains at the table and on the same check.
How Do I Alternate Alcoholic And Non-Alcoholic Drinks Without Losing The Ritual?
The ritual stays intact when the non-alcoholic round feels like a real drink instead of a pause. A glass of tap water or a plain soda often signals a break. A non-alcoholic drink that holds up in real glassware with real flavor keeps the sequence going. Little Saints non-alcoholic cocktails carry zero sugar, five calories, and a functional mushroom and botanical blend at a stated 100 mg dose per serving. The non-alcoholic spirits St. Ember, St. Oak, and St. Juniper mix 1:1 in classic cocktail specs, so the recipe, the glass, and the garnish stay the same from one round to the next.
Explore Non-Alcoholic Cocktails
The statements made on our website have not been evaluated by the Food and Drug Administration, Our products are not intended to diagnose, treat, cure or prevent any disease. If you are pregnant, nursing, taking any medications or have any medical conditions, consult your doctor before use.