| <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#step li").each(function (i) { i = i+1; $(this).addClass("item" i); }); }); </script> |

<li> element with a background image accordingly (step1.png, step2.png, step3.png, and so on..).| #step .item1 { background: url(step1.png) no-repeat; } #step .item2 { background: url(step2.png) no-repeat; } #step .item3 { background: url(step3.png) no-repeat; } |
| <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#commentlist li").each(function (i) { i = i+1; $(this).prepend('<span class="commentnumber"> #' i '</span>'); }); }); </script> |
<span class="commentnumber"> tag (with # + 1) to each <li> tag.
<li> element with position:relative and use position:absolute to place the .commentnumber to the top right corner.| #commentlist li { position: relative; } #commentlist .commentnumber { position: absolute; right: 0; top: 8px; } |