broke
broke

Reputation: 8302

Styling asp textboxes inside a list?

So I'm styling an HTML list with in my CSS like so:

.ulClaims li

{
   font-weight: bold; 
   color: #5c6467;
   font-size: 14px;
}

I have asp:textboxes in some of my 'li' tags. Is there anyway I can style them in my .ulClaims class to make things simple?

Upvotes: 2

Views: 81

Answers (1)

Alex
Alex

Reputation: 35407

Your CSS definition is only applying the style to the lis that are descendants of .ulClaims. To style the "textboxes" use something akin to:

.ulClaims li input[type="text"] { /* ... definitions ... */ }
.ulClaims li textarea { /* ... definitions ... */ }

This will directly target any input type="text" or textarea that is a descendant of .ulClaims li.

Upvotes: 4

Related Questions