0

How can I apply the style below to a type="submit" at the same time? Without duplicating the entire block?

input[type="button"] {
  width: 120px;
  margin-left: 35px;
  display: block;
}

3 Answers 3

3

using a comma(,) just like this:

input[type="button"], input[type="submit"] {
width: 120px;
margin-left: 35px;
display: block;
}

check more info here

Sign up to request clarification or add additional context in comments.

Comments

1

Use a ,:

input[type="button"], input[type="submit"] {
    width: 120px;
    margin-left: 35px;
    display: block;
}

Comments

1

You can apply a block of styles to multiple selectors by separating the selectors with commas, as follows:

input[type="button"], input[type="submit"] {
  width: 120px;
  margin-left: 35px; 
  display: block;
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.