4

私のウェブサイト http://www.myinvestmentdecision.com.auでプレースホルダー テキストが高すぎるという Google chrome で問題が発生しました。

[フィードバック] をクリックすると、プレースホルダーのテキストが高くなっていることがわかります。プレースホルダー スクリプトを持っていますが、chrome がプレースホルダーをサポートしていることを認識するとオフになります。

その点を証明するために、フォーム自体の jsfiddle を次に示します: http://jsfiddle.net/RAANA/

CSS のものである必要があります。何か案は?

4

3 に答える 3

6

以下の CSS から削除line-height:28pxします。

.form input[type="text"], .form input.text, .form .calculate_box .calc {
background: transparent url(../images/input-background.png) repeat-x left top;
border: 1px solid #A1A1A1;
margin-left: -1px;
height: 28px;
line-height: 28px;
display: block;
width: 284px;
}

line-height削除された添付のスクリーンショットを参照してください
ここに画像の説明を入力

于 2011-03-06T03:43:19.287 に答える
3

I think your line-hight:28 from here: (form.css)

.form { font-family: arial, sans-serif; }
.form input[type=text],
.form input.text,
.form .calculate_box .calc{
    background: transparent url(../images/input-background.png) repeat-x left top;
    border: 1px solid #a1a1a1;
    margin-left: -1px;
    height: 28px;
    line-height: 28px;
    display: block;
    width:284px;
}

Is causing the problem. Remember that this declaration applies to the content of the tag, as well as the tag itself. This can get you when it comes to forms..

于 2011-03-06T03:31:44.357 に答える
0

これが「正しい」方法であるかどうかはわかりませんが、入力フィールドに 5px のパディングを追加すると、メール フィールドのプレースホルダーが中央に配置されます。

その電子メール フィールドに適用される場所ならどこでも、これを CSS に追加するだけです。

padding: 5px;
于 2011-03-06T03:36:01.233 に答える