6

テキストエリアフィールドをレンダリングするHTMLテンプレートとCSSがありますが、フィールドをクリックすると、カーソルは、予想どおり左上からではなく、テキストエリアの半分から始まります。

これは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;
}
4

3 に答える 3

18

textareaタグの間にスペースを設けると、通常、このような望ましくない空白が発生します。スペースを入れずにコードを試してみてください。 <textarea></textarea>

于 2012-11-28T18:24:13.540 に答える
9

使っていると思います

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

あなたの問題を解決する必要があります。

于 2011-08-13T12:40:53.910 に答える
4

構文が正しくありません。「roy」が<textarea></textarea>タグを使用する必要があることを示唆しているため、textareaの値を持つtype属性を含めることはできません。

于 2011-08-13T13:58:18.167 に答える