How to use "and" on CSS3 selectors?

Asked

Viewed 84 times

9

I am trying to select only inputs whose class starts with "btn_" and which also have type="button".

Example:

input[type="button"] **&&** [class^="btn_"]

It is possible to do this?

1 answer

11


Yes it is possible, just join the two conditions.

input[type="button"][class^="btn_"] {
    height: 200px;
}

Example: http://jsfiddle.net/cj9jqofw/

  • 1

    Thank you for the reply. It worked perfectly.

Browser other questions tagged

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