I\'m using a Panel from Bootstrap
however for the heading I want to use my own background color for the heading. When I don\'t put panel-heading
class
Bootstrap sometimes uses contextual class constructs. Those are what you should target to change styling.
You don't need to create your own custom class as suggested in the answer from Kiran Varti.
So you only need:
CSS:
.panel-default > .panel-heading {
background: #black;
}
HTML:
Explanation here. Also see contextual class section here.
To match navbar-inverse use #222. Panel-inverse was requested in V3, but rejected due to larger priorities.
You can change the foreground color in that heading override or you can do it separately for panel titles. Depends what you are trying to achieve.
.panel-title {
color: white;
}