Brand the Browse button
::file-selector-button {
background: #2563eb;
color: #fff;
border: 0;
padding: .5rem .9rem;
border-radius: 8px;
}
The ::file-selector-button pseudo-element targets the button portion of an <input type="file"> control so you can align it with your form design.
input[type="file"]::file-selector-button {
background: #2563eb;
color: white;
border: 0;
}::file-selector-button {
background: #2563eb;
color: #fff;
border: 0;
padding: .5rem .9rem;
border-radius: 8px;
}::file-selector-button is a CSS selector.
Supported in modern browsers.
Bottom line: Safe for modern sites. Keep readable defaults without the selector.
Continue with :dir().
CODETOFUN NEWS
Get the latest IT news, programming updates, and technology trends directly on your phone.
Your daily dose of tech, straight to your feed.
2 people found this page helpful