CSS for TextBox only

G

Guest

I'd like to set the CSS style for all TextBox controls but only for the
TextBox controls (not all the "input" types). I'm confused about how to do
this. How do I specify in CSS the style I want for TextBoxes but NOT for
things like CheckBoxes, etc.?

Alex
 
E

Erik Funkenbusch

I'd like to set the CSS style for all TextBox controls but only for the
TextBox controls (not all the "input" types). I'm confused about how to do
this. How do I specify in CSS the style I want for TextBoxes but NOT for
things like CheckBoxes, etc.?

That depends.

input[type="text"] is the correct CSS, but this won't work in Internet
Explorer.

The only real solution is to apply a class to all your textboxes, such as
class="text" and then style .text as you would like.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,182
Latest member
BettinaPol

Latest Threads

Top