0

<label class="label" data-toggle="tooltip" title="Change your avatar">
<img class="rounded" id="avatar" src="https://avatars0.githubusercontent.com/u/3456749?s=160" alt="avatar">
       <input type="file" class="sr-only" id="input" name="image" accept="image/*">
     </label>

select image dialog box opens when image clicked how to make this to an icon. popup when a click icon!

<label class="btn-aux" data-toggle="tooltip" title="Change your avatar" for="profile_image" style="cursor: pointer;"><i class="ion ion-edit"></i>
         <input type="file" class="sr-only" id="input" name="image" accept="image/*"></label>

here nothing happens.....! how to do that

Gufran Hasan
  • 8,910
  • 7
  • 38
  • 51

1 Answers1

0

Do you mean this?

.ion {
  display: block;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: #fff url(https://cdn.sstatic.net/Sites/stackoverflow/img/favicon.ico) 0 0 no-repeat
}
#input {
  display: none
}
<label class="label" data-toggle="tooltip" title="Change your avatar">
  <i class="ion"></i>
  <input type="file" class="sr-only" id="input" name="image" accept="image/*">
</label>
Kavian K.
  • 1,340
  • 1
  • 9
  • 11