Haluk
Haluk

Reputation: 11

I would like to add line numbers to code samples on my web site. I would like to do this either thru CSS (generated content?) or javascript

See the code samples on http://www.smashingmagazine.com/2009/08/17/taming-advanced-css-selectors/ where the code samples have line numbers. Turning Javascript off (in Firefox) shows these sections without the line numbers. I would like a script that accomplished line numbering.

Upvotes: 1

Views: 1648

Answers (1)

peterjmag
peterjmag

Reputation: 6179

Smashing Magazine, like many others, uses a JS library called SyntaxHighlighter.

Another common one is Google Prettify.

Upvotes: 3

Related Questions