You can use max-height in the inline style attribute, as shown below:
<div class="panel panel-primary"> <div class="panel-heading">jhdsahfjhdfhs</div> <div class="panel-body" style="max-height: 10;">fdoinfds sdofjohisdfj</div> </div>
To use scrolling with content that overflows a given max-height , you can also try the following:
<div class="panel panel-primary"> <div class="panel-heading">jhdsahfjhdfhs</div> <div class="panel-body" style="max-height: 10;overflow-y: scroll;">fdoinfds sdofjohisdfj</div> </div>
To limit the height to a fixed value, you can use something like this.
<div class="panel panel-primary"> <div class="panel-heading">jhdsahfjhdfhs</div> <div class="panel-body" style="min-height: 10; max-height: 10;">fdoinfds sdofjohisdfj</div> </div>
Specify the same value for max-height and min-height (either in pixels or in dots - until it is consistent).
You can also put the same styles in the css class in the stylesheet (or the style tag, as shown below), and then include them in your tag. See below:
Style Code:
.fixed-panel { min-height: 10; max-height: 10; overflow-y: scroll; }
Apply style:
<div class="panel panel-primary"> <div class="panel-heading">jhdsahfjhdfhs</div> <div class="panel-body fixed-panel">fdoinfds sdofjohisdfj</div> </div>
Hope this helps with your need.
Benison Sam Jun 27 '14 at 12:08 2014-06-27 12:08
source share