Bootstrap textarea adding space characters inside text field -


i using bootstrap 3 rc1. problem having textarea — when page loads adds 3 spaces texarea, making placeholder text invisible, unless manually delete spaces.

how stop happening?

html

<form id="notesubmitform">   <fieldset>     <textarea id="note-text" rows="6" placeholder="add note" class="form-control">     </textarea>     <div class="form group">       <button id="notesubmitbutton" type="submit" class="btn btn-success btn-custom">         save note       </button>     </div>   </fieldset> </form> 

css

textarea#note-text {   width: 625px !important; } 

how stop happening?

by not having whitespace between textarea tags, have right now:

    <textarea id="note-text" rows="6" placeholder="add note" …>     </textarea> 

there’s line break (first line break directly @ beginning gets ignored browsers though), , there spaces before closing tag, part of value content of textarea well, because that’s how content of textarea written – between opening , closing tag.

if don’t want content there – don’t put content there:

<textarea …></textarea> 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -