Return to Snippet

Revision: 27141
at May 24, 2010 20:52 by hotdiggity


Initial Code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title>Comma separated list</title>
  <style>
#tags ul li{
  display:block;
  float:left;
  _display:inline;
  _float:none;
 }
#tags ul li::after{
  content:", ";
  white-space:pre;
 }
#tags ul li:first-child::before{
  content:"";
 }
#tags ul li:last-child::before{
  content:"& ";
  white-space:pre;
 }
 #tags ul li:last-child::after{
  content:"";
 }
#tags ul + *{
  clear:left;
 }
  </style>
 </head>
 <body>
  <div id="tags">
   <ul>
    <li>t-shirt (1)</li>
    <li>design (1)</li>
    <li>etiquette (1)</li>
   </ul>
  </div>
 </body>
</html>

Initial URL

                                

Initial Description
Separates an html list of words with a comma using CSS.

Initial Title
CSS Comma Separated List

Initial Tags
css, list

Initial Language
CSS