Skip to content

Instantly share code, notes, and snippets.

@ecowden
Created January 23, 2013 21:27
Show Gist options
  • Save ecowden/4613659 to your computer and use it in GitHub Desktop.
Save ecowden/4613659 to your computer and use it in GitHub Desktop.
Use Bootstrap .add-on styles to associate an icon with an input element
<!--
If pictures are worth a thousand words, here's a spiffy way to associate
icons with your input elements.
Use it. It's pretty.
For detailed examples and images, see:
http://twitter.github.com/bootstrap/base-css.html#forms
-->
<!--
Before...
-->
<div class="input-prepend">
<span class="add-on">
<i class="icon icon-search"></i>
</span>
<input type="text"/>
</div>
<!--
...and after
-->
<div class="input-append">
<input type="text">
<span class="add-on">
<i class="icon icon-search"></i>
</span>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment