I want to change a DHTML button when the mouse rolls over by changing the class, like so:
So my normal class has several attributes like
and I want my hoverclass to inherit all those attributes of the normal class so that I only need to override certain attributes, like so:
How do I make .hoverclass inherit the attributes of .normalclass?
Code:
<div class="normalclass"
onMouseover="this.className='hoverclass'"
onMouseout="this.className='normalclass'" >Testing</div>
So my normal class has several attributes like
Code:
.normalclass
{
margin-bottom: 5px;
background-color:yellow;
color:red;
width:130px;
}
and I want my hoverclass to inherit all those attributes of the normal class so that I only need to override certain attributes, like so:
Code:
.hoverclass {
background-color:green;
}
How do I make .hoverclass inherit the attributes of .normalclass?