Hello,
I am nearly finished with a client site. He wishes for all input fields that are of type "text" to have a border and a background color.
If I simply make a input { border: ...; background-color: #...; } in the style sheet, it will apply this to submit buttons as well.. which I do not want.
Can I apply css only to the text fields from the style sheet, or would I have to make a class in the stylesheet and manually add class="..." to each individual input text field?
-Scott
css input fields
Moderator: General Moderators
css input fields
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Code: Select all
input[type="text"] { width: 200px;border:1px solid #ddd; }Otherwise, as thiscatis mentioned, use a class
Also, background colors on form elements don't work on Mac's FYI
Last edited by JayBird on Wed May 23, 2007 3:31 am, edited 1 time in total.
Don't want to get into the whole IE flaming.. but dammit! It would've been so much easier. Manually adding classes to each input field is going to be a doozy.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.