The task of center-aligning an unordered list (which can’t have its width explicitly set) via CSS comes up every now and then. Logging it here for later.
“For a start you could text-align: center the ul inside the #ul_container_div and display: inline the li instead of floating them left.”
#ul_container_div{ width:100%; text-align:center; } #ul_container_div li { display: inline; }
Source of knowledge: http://archivist.incutio.com/viewlist/css-discuss/59041




