I am new to Bootstrap and Django. I am trying to style a card, but card header (background) does not fill entire width of the card. Here is an example:
Here is the code:
<div class="container">
<div class="grid">
<div class="row">
{% for list, content in content.items %}
<div class="card col-md-6 shadow-lg">
<a href="{{user_name}}/{{list}}">
<div class="card-header bg-secondary text-white">{{list}}</div>
<div class="card-body">
<ul>
{% for row in content %}
<li>{{row}}</li>
{% endfor %}
</ul>
</div>
</a>
</div>
{% endfor %}
</div>
</div>
</div>
You need to get rid of horizontal padding for the card. Add the px-0 class to the card div or p-0.
Regards.