Title: Set &quot;height&quot;
Last modified: August 21, 2016

---

# Set "height"

 *  [American2020](https://wordpress.org/support/users/american2020/)
 * (@american2020)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/set-height/)
 * How can I set the height for the code box?
 * My code is long, and I only want to show, lets say 10 lines, and then have a 
   scroll-bar on right.
 * Is it possible?
 * Thanks.
 * [http://wordpress.org/extend/plugins/syntaxhighlighter/](http://wordpress.org/extend/plugins/syntaxhighlighter/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * (@viper007bond)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/set-height/#post-3723494)
 * Maybe.
 * 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]
       </div>
       ```
   
 * If that works, I should probably add it as an option to my plugin.
 *  Thread Starter [American2020](https://wordpress.org/support/users/american2020/)
 * (@american2020)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/set-height/#post-3723505)
 * 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
 *  Thread Starter [American2020](https://wordpress.org/support/users/american2020/)
 * (@american2020)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/set-height/#post-3723787)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/syntaxhighlighter_ffffff.svg)
 * [SyntaxHighlighter Evolved](https://wordpress.org/plugins/syntaxhighlighter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/syntaxhighlighter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/syntaxhighlighter/)
 * [Active Topics](https://wordpress.org/support/plugin/syntaxhighlighter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/syntaxhighlighter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/syntaxhighlighter/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [American2020](https://wordpress.org/support/users/american2020/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/set-height/#post-3723787)
 * Status: not resolved