Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> .container { display: flex; align-items: flex-start; justify-content: flex-start; width: 100%; } input[type="file"] { position: absolute; z-index: -1; top: 15px; left: 20px; font-size: 17px; color: #b8b8b8; } .button-wrap { position: relative; } .button { display: inline-block; background-color: #1d6355; border-radius: 10px; border: 4px double #cccccc; color: #ffffff; text-align: center; font-size: 20px; padding: 8px; width: 100px; transition: all 0.5s; cursor: pointer; margin: 5px; } .button:hover { background-color: #00ab97; } </style> </head> <body> <div class="container"> <div class="button-wrap"> <label class="button" for="upload">Upload File</label> <input id="upload" type="file"> </div> </div> </body> </html>