Fiddle: http://jsfiddle.net/x58SG/1/
I changed your ul
CSS to:
ul {
margin:0 auto;
padding: 0;
}
The ul
element defaults to having left-padding, so you'll want to reset that. In addition, your width: 50%
was too narrow for the li
, so it was overflowing its parent container.
For future reference, I find Chrome's developer tools to be essential when debugging these sorts of problems. Right click on the element and select "inspect element". When you hover your mouse over the selector, chrome will highlight it on the page so you can see width, padding, margins, etc.