Saturday, 2 July 2016

How to custom design a file upload button

<html>
<head>
<style>
.upl-btn {
    background: rgba(0, 0, 0, 0) url("http://www.udrivecover.com/wp-content/themes/udrive/assets/img/btn-bg.jpg") repeat scroll center center;
    border: 2px solid #3ea4dc !important;
    border-radius: 8px !important;
    cursor: pointer;
    float: right;
    height: 26px;
    padding: 3px 0;
    transition: all 0.3s ease 0s;
    width: 100px;
}
.upl-btn::before {
    content: "Upload Image";
    font-size: 11px;
    margin-left: 14px;
    position: absolute;
}
.upl-file { 
    cursor: pointer;
    opacity: 0;
    text-align: right;
}
</style>
</head>
<body>
<div class="upl-btn">

<input id="upload" type="file" class="upl-file" >

</div>
</body>
</html>

No comments:

Post a Comment