rows Attributeを使用してみてください:
とにかく
<textarea rows="4" >
This should force the text area to only show 4 lines, or 5, as you desire.
</textarea>
、私はあなたがあなたのテキストのサイズを確認することができると思いますエリアまたは計算されたプロパティの をクリックし、[inspect]をクリックしますあなたのブラウザ( 例のクロムの場合)。 Styles/Computedをクリックすると、適用しているスタイルの が表示されます。
性質の画像:
はEDIT:
I'veは 試して、それを破壊されたプロパティについて考えるバイオリンを作ってみましたそれ。それはあなたがパディングプロパティは、サイズ
#editor1 {height: 10px;}
#editor1:focus {height: 20px;}
#editor2:focus { padding-bottom: 10px;}
<textarea id="editor1" placeholder="Check it!!"></textarea>
<textarea id="editor2" placeholder="Check it!!"></textarea>
にどのように影響するかも表示するようにcss`s :)内部
textarea:focus
または類似
変更されたスニペットを探す必要がありそうです
解答後のOPからのコメントで改善:
I did actually manage to find out what caused the problem. Hidden in one of the js files was some legacy code to manage resizing of textareas. As some of the pages where loading in templates on top of the actual page(in a aside/modal) the code wasnt running correctly. Thank you for taking the time. It led me to my
それがこの原因ページ上の他のCSSにする必要があり、それ自体であなたのコードとブートストラップ3.0を使用すると、同じ効果を得られない、 – Keith
'heigth'は' height' – Blazemonger
ARHええタイプのものでなければならないが、しかし、問題の原因となっ波平 –