Style input[type=checkbox] containing only part of input id

Asked

Viewed 39 times

1

I have a style in CSS like this:

input[type="checkbox"] {
    box-shadow:none;
    background-color: #f5f5f5;
}

I wanted to put in a checkbox who has a id special:

<input type='checkbox' id='check_" + @bancoDeQuestao.Id + "'></td>

Only that one id='check_' varies because it depends on a code that is the bancoDeQuestao.Id from the bank (is a list of checks): check_23, check_24, etc, the numbers always vary.

How to put in this style that it only considers the inputs that contain the id check_?

  • Wouldn’t it just be the checked inputs? That wouldn’t be enough to solve your problem?

  • not only the 'checked', would be all that have part of that id

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.