I'm struggling to center Bootstrap Icons within my buttons. The icon appears to be off-center horizontally, and I've tried various methods like text-align and flexbox with justify-content. It seems like the "letter" itself is causing some extra space on the right. Can someone provide a solution?
body {
display: flex;
justify-content: center;
align-items: center;
}
button {
padding: 4px;
font-size: 24px;
text-align: center;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="accec3c3d8dfd8decddc81c5cfc3c2dfec9d829a822d">[email protected]</a>/font/bootstrap-icons.css">
</head>
<body>
<button>
<i class="bi-play"></i>
</button>
</body>