Hi guys so I'm trying to create scroll to Top button in react.js and I have manage to finished the component but the problem is I can't make the icon vertically center on the circle button. How can I fix it ? I've tried to align the item to center. Is it because the Icon itself have some kind of padding on top ?
Here's my code:
return (
<button onClick={ScrollToTop} className="ButtonToTop" aria-hidden="true" style={{display: isVisible ? 'inline' : 'none'}}>
<BiArrowToTop/>
</button>
)
My css code:
.ButtonToTop{
align-items: center;
position: fixed;
width: 50px;
right: 10px;
bottom: 40px;
height: 50px;
font-size: 33px;
z-index: 1;
cursor: pointer;
background-color: #967A50;
color: #10255A;
}