I'm in the process of building a website using Bootstrap.
When viewing the webpage on desktop, everything looks great. However, when I switch to mobile view, the cards are not displaying as I would like them to.
In mobile view, the cards are aligned to the left side of the screen. I want them to be centered instead.
Below you'll find images showing the issue, along with the code that controls the cards:
Desktop View: https://i.sstatic.net/XufKt.png
Mobile View: https://i.sstatic.net/il60j.png
Card Code:
<h3 style="padding-left: 8%; padding-top: 2%; font-family: 'Verdana';">Your Listen Later</h3>
<div class="row" style="padding-left: 7%;">
{% for i in watch reversed %}
<div style="padding-left: 2%; padding-top: 1%;">
<div class="card" style="width: 18rem;">
<img src="{{i.image}}" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">{{i.name}}</h5>
<p class="card-text" style="color: green;">Tags: {{i.tags}}</p>
<p class="card-text" style="color: green;">Movie: {{i.movie}}</p>
<a href="/musicbeats/songs/{{i.song_id}}" class="btn btn-outline-danger ">Listen Song</a>
</div>
</div>
</div>
{% endfor %}
</div>