Customizing File Upload Buttons in CSS


Style file upload buttons for a more integrated design.

Source Code

input[type='file'] {
    color: transparent;
}
input[type='file']::before {
    content: 'Select file';
    color: black;
    display: inline-block;
    background: -webkit-linear-gradient(top, #f9f9f9, #e3e3e3);
    border: 1px solid #999;
    border-radius: 3px;
    padding: 5px 8px;
    outline: none;
    white-space: nowrap;
    -webkit-user-select: none;
    cursor: pointer;
    text-shadow: 1px 1px #fff;
    font-weight: 700;
    font-size: 10pt;
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments