Google Prettify: Line numbers won't show

1.3k views Asked by At

For some reason, my line numbers won't show. Is this a known issue? Code coloring works fine. It's just the line numbers that won't show

HTML

<pre class="prettyprint linenums"><code class="language-html">
    &lt;h1 class="test"&gt;This is a header&lt;/h1&gt;
    &lt;p&gt;This is a paragraph&lt;/p&gt;
</code></pre>

Does anyone know what can cause this?

2

There are 2 answers

0
Kriem On BEST ANSWER

Found the issue. It had to do with setting list item to display:inline-block. Removing that fixed it.

0
Simon Ugorji On

Just make sure you include run_prettify.js in your page, specifying parameters such as; autoload, lang, and skin.

I did this and line numbers just came up!

Read more here http://practicalseries.com/1001-webdevelopment/21-02-codefrag.html