469,935 Members | 2,155 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,935 developers. It's quick & easy.

Input text boxes, check boxes, and radio boxes

I was told that dotnet generates classes for input tags like this:

<span class="hello"><input type= "checkbox"></span>

The problem here is, the "input" class is overriding the "hello" class.
Ideally I wanted the html to be this way:

<input type= "checkbox" class="hello">

However since dotnet insists on doing it the first way, it's not working for
me.

My question now is, how do I make it work so that "input" isn't overriding
"hello"? Actually, I'm trying to set a particular style for text boxes, and
another for radio buttons, and another for check boxes. Is this possible?
That way I don't even have to designate a class in my html.
Jul 20 '05 #1
2 4568
Shabam wrote:
Actually, I'm trying to set a particular style for text boxes, and
another for radio buttons, and another for check boxes. Is this possible?
That way I don't even have to designate a class in my html.


You could use the attriute selector. But it is not supported by WinIE.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #2

"Shabam" <bl******@hotmail.com> wrote in message
news:0q********************@adelphia.com...
I was told that dotnet generates classes for input tags like this:

<span class="hello"><input type= "checkbox"></span>

The problem here is, the "input" class is overriding the "hello" class.
What do you mean? If you define

.hello input { ... }

you should get what you want.
Ideally I wanted the html to be this way:

<input type= "checkbox" class="hello">

However since dotnet insists on doing it the first way, it's not working for me.

My question now is, how do I make it work so that "input" isn't overriding
"hello"? Actually, I'm trying to set a particular style for text boxes, and another for radio buttons, and another for check boxes. Is this possible?
That way I don't even have to designate a class in my html.
CSS provides attribute selectors:

input[type="checkbox"]

but unfortunately IE doesn't support them.


Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by J_axx | last post: by
3 posts views Thread by F. Da Costa | last post: by
8 posts views Thread by David Cameron | last post: by
6 posts views Thread by Mike | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.