3

I am using blogspot.com.
I want to make my coding highlighting.
So, I use google code prettify api.

<link href='http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.css' rel='stylesheet' type='text/css'/> 

 

<pre class="prettyprint"> ... my coding place ... </pre>

Everything is fine but I would like to make Scrolling (like ., style="overflow-x: scroll")

Please let me know where should I modify to make scrolling of my code at blogspot.com

John Conde
  • 217,595
  • 99
  • 455
  • 496
Frank Myat Thu
  • 4,448
  • 9
  • 67
  • 113

3 Answers3

4

For others looking for a solution to this problem - you should checkout:

http://oneqonea.blogspot.com/2012/04/how-do-i-add-syntax-highlighting-to-my.html

It's a really easy "SyntaxHighlighter for Blogger" tutorial with screenshots and everything.

You should be up and running in only a few minutes.

John Erck
  • 9,478
  • 8
  • 61
  • 71
3

add to your css

.codescroll {
    overflow-x: scroll;
    overflow-y: scroll;
    max-height: 500px;
}

and then you can add more than one class to pre element :)

<pre class="prettyprint codescroll"> ... my coding place ... </pre>

that should do the trick

2

Not sure about Google prettify but you can use SyntaxHighlighter and with small change your code will look nice: http://www.simplethoughtsonline.com/2012/01/syntaxhighlighter-and-blogger.html

Bran
  • 136
  • 1
  • 9