Reputation: 505
I know there are many questions like mine. However none of them are working. I have this html file:
<div class="container col-md-6 col-md-offset-3">
<div class="panel-group">
<div class="panel panel-default">
<div class="panel-heading-custom panel-heading ">Username</div>
<div class="panel-body panel-info">{{ main.username }}</div>
</div>
</div>
and this css file:
.panel-default > .panel-heading-custom {
color: #333;
background: black;
border-color: #ddd;
}
i've tried many options:
.panel-heading
.panel-default > .panel-heading
.panel-default.panel-heading
.panel.panel-heading
And a couple more. I know you can us !important, but I don't think that's the right way to do it. Could you please help me with that?
This is what appears on my browser:
Upvotes: 0
Views: 4511
Reputation: 7498
I guess your styles are being overridden. You can make sure that your styles to be not overridden either by
check this snippet
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<style>
.panel-default>.panel-heading-custom {
color: #333;
background: black;
border-color: #ddd;
}
</style>
<div class="container col-md-6 col-md-offset-3">
<div class="panel-group">
<div class="panel panel-default">
<div class="panel-heading-custom panel-heading heading ">Username</div>
<div class="panel-body panel-info">{{ main.username }}</div>
</div>
</div>
Hope this helps
Upvotes: 2