html - How do I prevent placeholder text from being vertically centered in a large height input form element? -
placeholder text in input type='text' element height of 100px vertically centered. want aligned on top.
product.html
<div class="form-group"> <label for="description">description</label> <input type="text" name="description" id="description" placeholder="enter new product description..." class="form-control" /> </div> product.less
#description{ height: 100px; ::-webkit-input-placeholder { /* chrome/opera/safari */ vertical-align: top; } ::-moz-placeholder { /* firefox 19+ */ vertical-align: top; } :-ms-input-placeholder { /* ie 10+ */ vertical-align: top; } :-moz-placeholder { /* firefox 18- */ vertical-align: top; } } i have fiddled taking psuedo selectors out of #description block aren't compiled #description ::-webkit... didn't work. have tried types of combinations of vertical-align , can't figure out. maybe placeholder psuedo selector isn't right path? we're using bootstrap can't find cause force vertical align in placeholder, or bootstrappy way achieve top-aligned placeholder text.
edit: there no less compile errors. have confirmed psuedo-selectors being compiled .css files.
edit: had brain fart , trying build big text area hard way. textareas exist, use if have found here.
try :
:placeholder-shown selecting input when it's placeholder text being shown. opposed ::placeholder styles placeholder text.
#description{ height: 100px; } ::-webkit-input-placeholder { /* chrome/opera/safari */ position: relative !important; transform:translatey(-220%) !important; color:red !important; } input::-moz-placeholder { /* firefox 19+ */ vertical-align: top; } input::-ms-input-placeholder { /* ie 10+ */ vertical-align: top; } in code pseudo-element started respond our styling !important.

Comments
Post a Comment