Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

input.text in css

Status
Not open for further replies.

welldefined

Programmer
Mar 9, 2006
62
0
0
GB
Hi,

I want the css special for <input type="text"> and tried to put the following in my style.css file but not wording:
input.text {font-size: 14px; line-height: 19px; height: 19px; border: 1px solid;}
What I am doing wrong?

Thank you in advance.
 
Thank.
However, the like you suggested only deals with Input as a whole, there is no item for <input type="text">
 
What you were doing was assigning something to an input element that has a class called "text". Since you don't have that in your html code, it is not applied anywhere. However the path you took is the most you can do nowadays. Just apply the class="text" to all the input type="text" boxes. In CSS3 there is a selector that deals with what you want and you use it like this:
Code:
input[type="text"] {
 ...
}
Though that will only work with a few browsers today and definitely won't work in IE.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top