1

I am trying to append an icon to an input.

with font awesome is possible to attach that icon on the value of the input, like this:

<input class="btn" type="submit" value="&#xf090;">

where value="&#xf090;" is the equivalent of <i class="fa fa-sign-in"></i>, that is perfect so far, but I need that icon to be bigger, how can I accomplish that ? or what is the other way to attach that icon the input ?

and css

input[type="submit"] {
    font-family: FontAwesome;
}

and the icon must be attached to the left.

Non
  • 8,409
  • 20
  • 71
  • 123
  • possible duplicate of [Add Bootstrap Glyphicon to Input Box](http://stackoverflow.com/questions/18838964/add-bootstrap-glyphicon-to-input-box) – Adrift Feb 20 '15 at 20:41
  • Yisus, @Adrift is not a duplicate, see where I asked: where ```value=""``` is the equivalent of ``````, that is perfect so far, but I need that icon to be bigger, how can I accomplish that ? – Non Feb 20 '15 at 20:48
  • @Adrift I am asking how to make that I icon bigger on ```value=""``` does not have nothing to do with the other question – Non Feb 20 '15 at 20:49

1 Answers1

2

I would use <button type="submit"></button>

@font-face {
  font-family: FontAwasome;
  src: url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/fonts/fontawesome-webfont.woff");
}

.sign-in:after {
  content: '';
  display: inline-block;
  font-family: FontAwasome;
  font-size: 2em;
  line-height: 2.75rem;
  height: 2.75rem;
  vertical-align: top;
}

button {
  background-color: blue;
  border: none;
  color: white;
  min-height: 2.75em;
  margin: 0;
  padding: 0 1em;
}
<button type="submit" class="sign-in"></button>
vkjgr
  • 4,338
  • 1
  • 26
  • 19