Panel title blank

When I use the col-lg-6 class in panel in bootstrap, panel-heading does not fill the width of the panel.

How can this be fixed?

 <div class="container"> <div class="row"> <div class="panel panel-default col-lg-6"> <div class="panel-heading">Panel heading without title</div> <div class="panel-body"> Panel content </div> </div> </div> </div> 
+6
source share
2 answers

Simple fix. Move col-lg-6 to the div tag that surrounds the panel as such:

 <div class="row"> <div class="col-lg-6"> <div class="panel panel-default"> <div class="panel-heading">Panel heading without title</div> <div class="panel-body"> Panel content </div> </div> </div> </div> 
+6
source

Giving col-lg-6 you give the panel the width specified in col-lg-6 . Instead, place the layout of the panel inside a div containing col-lg-6 .

Below is a live working demo .

I'm not sure if you want this or not.

0
source

Source: https://habr.com/ru/post/986415/


All Articles