Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make panel-heading fixed with Bootstrap?

I have this Bootstrap structure:

<div class="panel panel-default" style="height:450px;overflow-y:auto">
  <div class="panel-heading">
    <h3 class="panel-title">{% trans "News" %}</h3>
  </div>
  <div class="panel-body" style="padding:0;border:0px;">
  </div>
</div>

When I scroll the div panel-heading will not stay fixed as I want it to. How do I accomplish that?

like image 914
First Last Avatar asked Feb 15 '16 20:02

First Last


1 Answers

Just put overflow-y parametr in panel-body instead of in whole panel div:

<div class="panel panel-default">
  <div class="panel-heading">
    <h3 class="panel-title">{% trans "News" %}</h3>
  </div>
  <div class="panel-body" style="padding:0;border:0px;height:450px;overflow-y:auto">
  </div>
</div>
like image 190
Marek Kus Avatar answered Oct 27 '22 01:10

Marek Kus