The problem is in your CSS. Your selector should be:
ul#allposts li
But IDs should be unique, so you shouldn't need to qualify it with a tag name:
#allposts li
Your selector as it currently stands reads:
All li
elements that are descendants of elements with the ID of allposts
that are descendants of all ul
elements, which probably isn't what you want.