Created
January 23, 2013 21:27
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
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