Skip to content

Instantly share code, notes, and snippets.

@Nikeshsuwal
Last active December 14, 2015 05:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nikeshsuwal/6649e8ac9cd8bea5992c to your computer and use it in GitHub Desktop.
Save Nikeshsuwal/6649e8ac9cd8bea5992c to your computer and use it in GitHub Desktop.
Use fontawesome icon as background image
form
.form-group
.image-upload
label for="society_image" class="input-lg"
span
| Upload Society Picture
= f.file_field :image, placeholder: "Upload Society Picture",class: 'form-control input-lg inputfile'
.image-upload
positon: relative
input
display: none
label
cursor: pointer
background: #fff
border: 1px solid $input-border
width: 100%
color: $input-color-placeholder
&:after
content: '\f0ee'
font-family: FontAwesome
font-style: normal
font-weight: normal
position: absolute
color: #ddd
font-size: 30px
right: 15px
top: 3px
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment