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

mattyoung’s picture

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

fizk’s picture

Status: Active » Closed (fixed)