Struggling to style a file input button and encountering some issues with labels.
Here is the button in question. Firstly, how can I center the text in the label? Secondly, how can I make the entire button clickable instead of just the upper half?
Also, it's crucial that the button maintains its position as shown in this image.
Using Bootstrap along with a custom CSS file.
.container {
display: grid;
grid-template-columns: 1fr 1fr;
}
input[type="file"] {
width: 0.1px;
height: 0.1px;
opacity: 0;
overflow: hidden;
position: absolute;
z-index: -1;
}
.custom-file-upload {
background-color: rgb(99, 99, 99);
border-radius: 15px;
border: 1px solid #ccc;
margin: 6px 180px;
cursor: pointer;
}
<div class="fixed-bottom bg-secondary container" style="border-radius: 25px 25px 0px 0px;">
<input id="texture-upload" class="pt-2" type="file">
<input id="texture-upload" class="pt-2" type="file">
<label for="texture-upload" class="custom-file-upload">
<p class="text-white text-center pt-2">Select texture folder</p>
</label>
<a class="fixed-bottom text-secondary text-center pb-2">Made with ❤️ by Maloni</a>
</div>