I was wondering how you can create css styling inside an input field such as stackoverflow's tagging system?
When you click on a tag, the text will be styled. And also, when you click on the styled tag, it will be normal again. I guess my main concern is how to style text inside an input field?
Thanks!
Only the bit you type in is an input, the other tags are just styled
a
elements. When you hit return, the input moves right and gets shorter, and the value is copied and a newa
element is created.The text in the input isn't styled.
This might help you: http://basdebie.com/jquery-plugins/jquery-tags-autosuggest-like-delicious-stackoverflow-facebook/
By looking at this code, you should be able to create something similar, or just use the plugin.
The tags are not input fields, they are links! On SO, the tags use the following styles: