私のページにフォームがあり、jQueryバリデーションプラグインを使ってhttp://jqueryvalidation.org が入力されていない場合はフォームフィールドの下にエラーが表示されます。必要なフォームフィールドのスタイルを設定するには?
私はこれらのエラーのスタイルを設定することができますか?私は基本的に、実際のフィールド自体の中にエラーを表示し、テキストを特定の色にしたい。これどうやってするの?ここで
は私のWebページ http://geofilterme.com/makemeone/<form id="form" class="topBefore" method="post" action="thankyou.php">
<input id="name" type="text" name="sender" placeholder="Name" required="">
<input id="email" type="email" name="senderEmail" placeholder="E-mail" required="">
<input id="snapchat" type="text" name="snapchat" placeholder="Snapchat username">
<input id="reach" type="text" name="reach" placeholder="Estimated reach (number of people)" required="">
<textarea id="message" type="text" name="message" placeholder="Describe what you want on the geofilter, and what it’s for:" required=""></textarea>
<input id="submit" type="submit" name="submit" value="SUBMIT">
</form>
CSSを使用したスタイル。ポジションはjqueryになります –
ポジションを見つける場所がわかりません。そして、私はCSSで何を呼びますか? –
各要素にはIDがあります。これらを使用すると、個別にスタイルを設定できます。例えば、 '#name {width:100px; } '。複数の要素をスタイルする場合は、各要素で同じクラス名を使用します: 'class =" form_input_fields "'そしてCSSを使ってそれらのすべてをスタイルします: '.form_input_fields {width:100px; } ' – icecub