- 1

How to change color of button?

25th May 2017, 1:44 PM
Roland Doctor
Roland Doctor - avatar
3 Answers
+ 2
...set changes for tag specifically.. /* HTML */ <button>click</button> /* CSS */ button { color: #3388ff; background-color: green; } ...set changes for button via id /* HTML */ <button id="#button>click</button> /* CSS */ #button { color: #3388ff; background-color: green; } ...set changes for button via class /* HTML */ <button class="button">click</button> /* CSS */ .button { color: #3388ff; background-color: green; } put the CSS in a style tag and use the html in body.. u can add extra properties or attributes e.g borders, padding, margin e.t.c..
25th May 2017, 1:51 PM
W͛onderB͛oy (◣_◱)
W͛onderB͛oy (◣_◱) - avatar
+ 1
with css: .customButton { background-color: red; }
25th May 2017, 1:49 PM
Ulisses Cruz
Ulisses Cruz - avatar
+ 1
<input type="button" style="background-color:#0000ff;color: #fff;border-radius: 25px;" value="submit"> if you use button as a tag <button type="button" style="background-color:#0000ff;color: #fff;border-radius: 25px;" onclick="alert ('Hello inline styling')" > Submit</button>
25th May 2017, 1:54 PM
Melih Melik Sonmez
Melih Melik Sonmez - avatar