Using the display property to make a list display inline
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
ul.post-listing li { display: inline; font-style: italic; }
ul.post-listing li:after { content: ','; } /* add a comma */
</style>
</head>
<body>
<ul class="post-listing"> <!-- generated content -->
<lh>Posts by the author:</lh>
<li><a href="/?p=1">What happened yesterday</a></li>
<li><a href="/?p=2">What's happening now</a></li>
<li><a href="/?p=3">What will happen tomorrow</a></li>
</ul>
</body>
</html>
Related examples in the same category