Posted by oshman on July 23, 2011 at 8:34am
2 followers
Jump to:
| Project: | Syntax highlighter |
| Version: | 7.x-1.1 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I've the the module working. Looked over the documentation but not finding an answer. My question, is there a way to limit the display area of the code (force it to use a vertical scroll bar if over X # of lines)?
Thanks for any advice.
Comments
#1
You can assign css class name(s) to the code block pre tag and then use css styling to get what you want.
For your code, do this:
<pre class="brush: php; class-name: 'my-special-class'">...code...
</pre>
in css
.my-special-class {height: 10em;
overflow-y: auto;
}
if you want all syntaxhighlighter code block to be the same, you don't even need to assign class name; you can simply use the default "syntaxhighlighter" class name.
See http://alexgorbatchev.com/SyntaxHighlighter/manual/demo/class-name.html