
Originally Posted by
ameerulislam
I'm not very clear here.
Felgall is saying that each of your text inputs and textareas ideally should have a unique id, such as
Code:
<div>
<label for="email">Email Address</label>
<input name="email" type="email" id="email" value="">
</div>
<div>
<label for="comm">Comments</label>
<textarea name="comments" id="comm"></textarea>
</div>
So then you would style those inputs with something like
Code:
#email, #comm {width: 500px;}
It's not necessarily the most efficient option, though, especially if you have a lot of inputs/textareas.
Note that your code should have been this:
Code:
#myform input[type="text"], #myform textarea {width: 500px;}
rather than this:
Code:
#myform input[type="text"], textarea {width: 500px;}
Bookmarks