b1ckr0se
b1ckr0se

Reputation: 13

select one input from multiple HTML, CSS

How can I select in CSS, one input from more inputs with same type?

<input type="submit" value="send">
<input type="submit" value="reset">

I want to edit only input with value reset

Upvotes: 0

Views: 130

Answers (3)

lalithkumar
lalithkumar

Reputation: 3530

If you are using same style in many element you can create .css file and add there.Or else you can do like this:

<input type="submit" value="reset" style='background-color:green;'>

Upvotes: 1

Davi Alves
Davi Alves

Reputation: 51

You can use input[type="submit"]:last-of-type

Upvotes: 1

XYZ
XYZ

Reputation: 4480

input[value="reset"] {
    background-color: red;
    border:none;
    color:white;
}
<input type="submit" value="send">
<input type="submit" value="reset">

Upvotes: 2

Related Questions