I am working on making a blog template with Bootstrap 5.
I run into a (small) problem while making the search box.
Using the code below conveniently gives me a small close button:
.input-group-append .btn {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet">
<script src='https://kit.fontawesome.com/a076d05399.js' crossorigin='anonymous'></script>
<nav class="navbar sticky-top navbar-expand-md navbar-dark bg-light">
<form class="w-100 px-2 mx-auto mt-2 mt-md-0" role="search">
<div class="input-group">
<input class="form-control search-box" type="search" placeholder="Search articles..." aria-label="">
<div class="input-group-append">
<button class="btn btn-success" type="submit">
Search
</button>
</div>
</div>
</form>
</nav>
The goal
I wish to change the icon used by default as a close button
The problem
I have been ubable to target the icon that Bootstrap uses by default as a close button.
For this reason, I can not change it in any way: replacing the image with another, targeting it with CSS, etc.
Questions:
- Is it an image that Bootstrap uses as a close icon? If so, what's its name and how can I replace it?
- Alternatively, can I change its appearance with CSS?