Prettier Code Snippets with CSS

Iím kind of surprised I havenít seen this before, but here goes.
To give your code blocks prettier styling, with every other row of code being highlighted differently, use the following snippet:


It simply creates a gradient with two rows, each matching the line height, giving a nice alternating row like effect without any extra markup. Itís also what Iím using here on Rockstars.
I like this well enough I may roll it into the base LESS file for my PSD to HTML projects, but I need to do a little more testing in older versions of Firefox.
Neat right?

Leave a Reply

My Service

In addition to our PSD to HTML service, I also provide PSD to WordPress, PSD to Shopify, and PSD to Tumblr services.

For other CMS or template types (such as Joomla or Dreamweaver) please contact with your requirements

On Twitter

Follow me on Twitter

Contact Details

360 S 4th St #111
Pocatello, ID 83201 USA
Hours: M-T 10AM-5PM, F 10AM-2PM (PST)