CSS FOR MULTIPLE ATTRIBUTES?

Goti Bandu

Total Post:119

Points:835
Posted by  Goti Bandu
 1326  View(s)
Ratings:
Rate this:

Hi Everyone!

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.

Thanks in advance!

  1. AVADHESH PATEL

    Post:604

    Points:4228
    Re: CSS for multiple attributes?

    Hi Goti Bandu!

    which property is comman for selectors, you can put as below

    input[type="text"],input[type="password"] {
        width: 300px;
    }

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!