2011-08-13 5 views
5

テキストエリアをレンダリングするHTMLテンプレートとCSSがありますが、フィールドをクリックすると、カーソルは上からではなくテキストエリアの半分から開始します私が期待するように残しました。HTML Textarea - 上からではなくテキストエリアの中心から始まるカーソル

これはIEでは発生しませんが、ChromeとFFでは発生します。私はまた、以下にリストされている以前の値のリストを得て、テキストボックススタイルが適用されていることを示唆しています。

修正するにはどのCSSプロプライエタを見ておくべきですか?ここで

はHTMLである:ここでは

<input id="description" class="textarea" type="textarea" name="description" cols="70" rows="50"> 

は、テキスト領域に割り当てられているプロパティです:

.standardForm .textarea { 
    bottom: 0; 
    height: 90px; 
    left: 0; 
    margin-bottom: 0.5em; 
    right: 0; 
} 
custom.css (line 255) 
.standardForm .textbox, .standardForm .textarea, .standardForm .submit, .standardForm .select { 
    background: none repeat scroll 0 0 White; 
    border: 1px dotted #AAAAAA; 
} 
custom.css (line 251) 
.standardForm .textbox, .standardForm .textarea, .standardForm .select { 
    font-size: 12px; 
    overflow: hidden; 
    padding: 7px; 
    resize: none; 
    width: 90%; 
} 
custom.css (line 250) 
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, input, button, textarea { 
    background: none repeat scroll 0 0 transparent; 
    border: 0 none; 
    font-size: 100%; 
    font-weight: normal; 
    margin: 0; 
    outline: 0 none; 
    padding: 0; 
    text-decoration: none; 
    vertical-align: baseline; 
} 
+2

input要素には "textarea"型はありませんが、textarea要素はありません。 –

答えて

8

私は

<textarea id="description" class="textarea" name="description" cols="70" rows="50"></textarea> 

を使用して、あなたの問題を解決すべきだと思います。

+0

Doh!それを指摘してくれてありがとう、長い日;) – Ben

4

構文が正しくありません。文字列を "roy"の代わりに使用することをお勧めします。<textarea></textarea>タグ

15

通常、textareaタグ間にスペースを入れると、望ましくない空白が生じることがあります。そのトリックを行うだろう。 <textarea></textarea>

関連する問題