• Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS Input field like this one on the forum for the tags.

SpongeBOB

Well-Known Coder
Hi everyone,

How can I make simply an ~input field that work like the one on this very forum ? -->
damn_thats_neat.png

Without any extra add-on (like JSquery etc.. just CSS, HTML, or Regular Javascript.

Thanks.
 

Ordep-20

Active Coder
I grab this code from stackover..


Its relative simple you need have a div and a input , an event on typing to show the input after the user type the content will show into a div

Code:
<div class="js-tag-editor tag-editor multi-line s-input" style="padding: 0px 9.1px; box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; width: 100%;"><span><span class="s-tag rendered-element">ruby<button class="s-tag--dismiss baw0 js-delete-tag" type="button" title="Remove tag"><svg class="svg-icon iconClearSm pe-none" width="14" height="14" viewBox="0 0 14 14"><path d="M12 3.41L10.59 2 7 5.59 3.41 2 2 3.41 5.59 7 2 10.59 3.41 12 7 8.41 10.59 12 12 10.59 8.41 7z"></path></svg></button></span></span><input type="text" autocomplete="off" tabindex="0" aria-autocomplete="list" aria-haspopup="listbox" role="combobox" aria-expanded="false" placeholder="" id="tageditor-replacing-tagnames--input" class="s-input js-tageditor-replacing" style="width: 19px;"><span></span></div>


HTML:
<input type="text" autocomplete="off" tabindex="0" aria-autocomplete="list" aria-haspopup="listbox" role="combobox" aria-expanded="false" placeholder="e.g. (ruby-on-rails xcode regex)" id="tageditor-replacing-tagnames--input" class="s-input js-tageditor-replacing" style="width: 19px;">

I seek for more info
 
Top