css: add text before or after Posted on 2011-12-19 by prettyscripts Use :before and :after pseudo elements with CSS property content. eg, to separate a list of items with ‘|’: li:after { content: ' | '; } li:last-child:after { content: ''; } Note line 2: no separator after the last item in the list. Share this:Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window)Click to share on Google+ (Opens in new window) Related