Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Nav bar and its pesky width! Reply To: [Solved] Nav bar and its pesky width!

#176133
Paulie_D
Member

If I understand you correctly, you want the list items to span across the whole width of ul.

Presumably you would want this to be dynamic so that it works regardless of the number of li.

The simplest method is to declare the top-level ul as display:table with width:100% and then the li as display:table-cell instead of float:left.

I’d also throw in text-align center.

I have this lying around: http://jsfiddle.net/KhC94/4/