I am using prettify:
<pre class="prettyprint linenums">
some code
</pre>
It works but the line number show every 5 lines and not for every line. I am using these files
<link href="../src/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../src/prettify.js"></script>
Basically at the end of this page http://google-code-prettify.googlecode.com/svn/trunk/styles/index.html you can see that I want, but I looked at that code and I can't figure it out.
The root cause is
list-style-type: none
in prettify.css:You can either remove that rule or override it with:
I like having the alternating background colors, so did it this way:
Solution
Instead of modifying the CSS you can simply add in a line of CSS to achieve the desired behavior:
Example
A full example might have the code below. View results via jsfiddle or see below
http://img801.imageshack.us/img801/8498/al6c.png