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,215 days · since 2004
posts
294 · busiest 2026 (64)
words
~143,065 · ~10 h read
topics
tech 239 · personal 55
langs
en 229 · pl 65
written
211 by hand · 83 AI-assisted
projects
3
build
ca50768 · 2026-06-30