CSS for multiple attributes?

Total Post:119


 1664  View(s)
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. 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;


Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.