Forum Moderators: not2easy
<form action="whatever.php" method="GET">
<div style="background-color: #F2F2F2; padding: 20px">
blah blah blah
</div>
</form> <form action="whatever.php" method="GET" style="background-color: #F2F2F2; padding: 20px">
blah blah blah
</form>
input[type=password] to style password fields input[type=text] to style all or some text fields input[type=number] to style number fields, or style the "textarea" elements of the form.
Is there any particular reason why I should NOT apply the style directly to the <form>, though?I don’t see anything wrong with it. Just because the elements <div> and <span> were created specifically as armatures to hang CSS on, doesn’t mean you can’t also apply styles directly to elements that already exist anyway.