A place to log my programming solutions.

Tagged :: css

19
Feb 10

Center Align a UL Menu

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

4
Jan 09

CSS Neatness Technique

css-neatness-technique_0.jpg We’ve all seen long and unmanageable CSS files, sometimes hundreds or even thousands of lines long.  Finding the exact declaration you’re looking for can be a royal pain in the arse.  It’s worse when style declarations for a particular element can be found more than once in a file, such as when the coder wants to separate structural styling from say typography styling.

Read more »

About NVNCBL and Myself

Contact Me