I’m trying to get some buttons to work in Bootstrap 5:
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet" />
<div class="container-fluid">
<div class="row">
<div class="col-12">
<a class="btn-primary">0000</a>
<button class="btn-primary">0000</button>
</div>
</div>
</div>
But the styles aren’t being applied correctly, the buttons appear to be missing the rounded corners and the padding:
I’m only loading the styles from <link href="css/bootstrap.min.css" rel="stylesheet">
which I’m pretty sure is what I always do.
4
Answers
Need to
btn
align with other custom bootstrap classes. Read about buttons hereIt misses the "btn" class.
you forgot the
btn
classChange class class="btn-primary" to class="btn btn-primary"