html - How to make Bootstrap Panel body with fixed height -


i using bootstrap's panel display text , image, text grows, body of panel increases. want know how create body fixed height, e.g. 10 rows or @ 10 rows. here code:

<div class="span4">   <div class="panel panel-primary">     <div class="panel-heading">jhdsahfjhdfhs</div>     <div class="panel-body">fdoinfds sdofjohisdfj</div>   </div> </div> 

you can use max-height in inline style attribute, 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 content overflows given max-height, can alternatively try 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 restrict height fixed value can use 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 same value both max-height , min-height (either in pixels or in points – long it’s consistent).

you can put same styles in css class in stylesheet (or style tag shown below) , include same in 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 helps need.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -