0

How to hide button by its value using CSS ?

eg:

<input type="submit" value="Foo" />
<input type="submit" value="Bar" />

How i can hide the Button that have value="Foo"

1
  • 3
    input[value="Foo"]{display:none;} Commented Mar 22, 2017 at 9:16

3 Answers 3

3

http://codepen.io/NickHG/pen/WpzYLR

input[value="Foo"]{
  display:none;
}

using this method above

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

Comments

1

This is possible with css attribute selectors:

input[value="Foo"] { 
    display:none;
}​

Comments

1

Update style More learn css attribute selectors

input[value="Foo"] { 
    display:none;
}

input[value="Foo"] { 
    display:none;
}
<input type="submit" value="Foo" />
<input type="submit" value="Bar" />

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.