I want to center vertically No file chosen text with the file button. How I can do that?
Asked
Active
Viewed 169 times
-3
Tomasz Mularczyk
- 31,418
- 19
- 112
- 151
Haseeb Ahmad
- 6,622
- 11
- 47
- 118
-
can i see your html & css code? – Farhad Bagherlo Oct 21 '17 at 20:54
-
2Possible duplicate of [Change the "No file chosen":](https://stackoverflow.com/questions/16001586/change-the-no-file-chosen) – divy3993 Oct 21 '17 at 20:55
1 Answers
2
Well, you could put both the button and the text in a flex-box by placing them inside a div with the flex-container class. Then style the .flex-container div with align-items: center in your css file. Here's some more info, and here's a very basic example.
.flex-container {
align-items: center;
}
button {
height: 100px;
width: 100px;
font-size: large;
}
span {
font-size: small;
}
<div class="flex-container">
<button class='flex-item'>Big button</button>
<span class='flex-item'>Tiny text</span>
</div>
Brent Pappas
- 199
- 11