I'm trying to apply a hover effect to all button tags that have the class dialog-btn. I've tried .dialog-btn:hover{background-color:gold} but that doesn't work. I've also tried other suggestions to similar questions but still no luck. Can someone please clarify how I can do this?
Neither of the two examples below works.
button.dialog-btn:hover {
  background-color: gold;
}
<div class="dialog-btns">
  <button class="dialog-btn" id="yes">Ref Match</button>
  <button class="dialog-btn" id="about">About</button>
</div>
.dialog-btn:hover {
  background-color: gold;
}
<div class="dialog-btns">
  <button class="dialog-btn" id="yes">Ref Match</button>
  <button class="dialog-btn" id="about">About</button>
</div>
EDIT 2:
 #yes{
    background-color:green;
 }
 #about{
    background-color:purple;
 }
The code above appears to overwrite the .dialog-btn:hover code above. Why is that?