Home › Forums › CSS › [Solved] Nav bar and its pesky width! › Reply To: [Solved] Nav bar and its pesky width!
July 22, 2014 at 3:15 am
#176133
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/