I need help creating a button with an image using the following code:
.btnWo {
position: relative;
outline: none;
border: none;
height: 150px;
width: 400px;
border-radius: 10px;
color: #FFF;
}
.btnWo img {
height: 150px;
width: 400px;
border-radius: 10px;
object-fit: cover;
}
.button-text {
position: absolute;
margin-right: 25px;
bottom: 25%;
width: 100%;
right: 0%;
text-align: right;
}
.button-text2 {
bottom: 10%;
}
<div class="wo-img">
<button id="btnWo" class="btnWo">
<img src="https://i.postimg.cc/XNKnzLR0/woBg1.jpg">
<span id="woName" class="button-text">Name</span>
<span id="woTime" class="button-text button-text2">Time</span>
</button>
</div>
However, I'm facing an issue where the image is not fully covering the button as desired. I tried solutions involving padding and transforming but it didn't solve the problem. Any suggestions on how to achieve this?