When you hover over the icon is displayed above the image. But I want the icon to display as follows
And while I click, it should let me browse files like 
<input type ='file'>
How can i do this?
I tried to put a file tag for everyone, but that didn't work. How can i do this?
.profile-img-container { position: absolute; width:50%; } .profile-img-container img:hover { opacity: 0.5; z-index: 501; } .profile-img-container img:hover + i { display: block; z-index: 500; } .profile-img-container i { display: none; position: absolute; margin-left:43%; margin-top:40%; } .profile-img-container img { position:absolute; }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" /> <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" /> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script> <div class="profile-img-container"> <img src="http://s3.amazonaws.com/37assets/svn/765-default-avatar.png" class="img-thumbnail img-circle img-responsive" /> <i class="fa fa-upload fa-5x"></i> </div>
violin
source share