Support » Plugin: SyntaxHighlighter Evolved » Set "height"

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Alex Mills



    The highlighter package that my plugin uses doesn’t support that but it might be possible to wrap it in a <div> of fixed height and give that <div> a scrollbar. You should be able to do this yourself I think:

    <div style="height:200px;overflow:auto;">
    [php]<?php echo 'hello world!'; ?>[/php]

    If that works, I should probably add it as an option to my plugin.

    Well, on the file shCore.css on the folder of the version 3 I modified the nect lines this way and it’s doing his job.

    .syntaxhighlighter {
      height: 400px !important;
      width: 100% !important;
      margin: 1em 0 1em 0 !important;
      position: relative !important;
      overflow: auto !important;
      overflow-y: auto !important;
      font-size: 1em !important;

    Note the height added and also the change on the overflow-y

    Well, I didn’t tried the div but by adding a height to that class and the overflow-y to auto, worked ok. I also think I can just remove the overflow-y and leave only overflow auto.

    Thanks for the answer. And yes it will be a great option for this plugin to be able to set the height, either from the setup, or from the same code on each post, in case someone needs different heights.

    [code lang=”something” height=”xxx px”]

    That would be awesome.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Set "height"’ is closed to new replies.