css :last,CSS :not(:last-child):after selector

Your sample does not work in IE for me, you have to specify Doctype header in your document to render your page in standard way in IE to use the content CSS property:

  • One
  • Two
  • Three
  • Four
  • Five

Second way is to use CSS 3 selectors

li:not(:last-of-type):after

{

content: " |";

}

But you still need to specify Doctype

And third way is to use JQuery with some script like following:

  • One
  • Two
  • Three
  • Four
  • Five

$(document).ready(function () {

$("li:not(:last)").append(" | ");

});

Advantage of third way is that you dont have to specify doctype and jQuery will take care of compatibility.