neo33 neo33 - 1 year ago 93
CSS Question

How to change the behavior of the following css button?

Hello I am working in the following small page, I have two buttons, one to hide a textarea and the other to show it, in fact they work well however I would like to color the buttom called: Hide in green, in order to do it I tried:

<div class="wrapper">
<button class="button buttom2" style="vertical-align:middle" onclick="hide()" background-color= "green"; ><span>Hide</span></button>

but It doesn't affect the behavior of my button, I would like to appreciate any suggestion to fix the problem, I created the following jsfiddle file to show the problem:

Answer Source

You are setting background-color= "green"; outside style attribute, you need to put it inside style attribute

<button class="button buttom2" style="vertical-align:middle;background-color:green" onclick="hide()";><span>Hide</span></button>


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download