Reputation: 16275
I'm trying to consolidate the following:
input[type="text"] {
width: 300px;
}
input[type="password"] {
width: 300px;
}
Into something like this:
input[type="text"][type="password"] {
width: 300px;
}
I tried this, type="text", "password"
, and a few other things.
Upvotes: 2
Views: 44
Reputation: 21882
Or simply
input { width: 300px; }
Then apply any other styles via type selectors
input[type="text"] { background: #ffd; }
input[type="password"] { background: #fff; }
Upvotes: 1
Reputation: 27364
You can use many selectors as you want with commas
,
input[type="text"],input[type="password"] {
width: 300px;
}
Upvotes: 7