Zurb Foundation 4 - Center elements in Top Bar navigation

· Tech · No AI

Some time ago i wanted to center all elements in a top bar navigation using Foundation CSS Framework. Below is a simple solution.

.top-bar:not(.expanded) section ul {
display: table;
margin: 0 auto;
li {
display: table-cell;
}
}

EOT.

uptime
8,240 days · since 2004
posts
295 · busiest 2026 (65)
words
~144,041 · ~10 h read
topics
tech 240 · personal 55
langs
en 230 · pl 65
written
211 by hand · 84 AI-assisted
projects
3
build
ef72eda · 2026-07-24