I am facing an issue with the hover color of my buttons. One of them has a different color, so the hover effect I chose for the rest doesn't quite work with that button. To resolve this, I decided to create an #id specifically for that button. Here is the CSS and HTML code:
Just to clarify, .boutonsim is the class for all buttons, while #boutonachat is the id for the specific button in question.
Despite creating the id, it seems to have no effect and I'm unsure about the syntax to make it work.
.boutonsim { /*construction d'un bouton avec faux fond*/
display: block;
height: 45px;
width: 150px;
position: absolute;
top: 1.9em;
z-index: 1;
font-size: 16px;
}
.top-container > button {
display: block;
width: 150px;
height: 45px;
background-repeat: no-repeat;
background-color: rgba(255, 255, 255, 0);
color: white;
border: none;
font-family: 'CapitalisTypOasis', 'CapitalisTypOasisMedium';
font-size: 16px;
text-align: center;
z-index: 2;
position: absolute;
top: 1.9em;
padding: 0;
}
.top-container > button:hover {
color: brown;
}
.top-container > button:hover {
color: rosybrown;
}
HTML
<div class="top-container">
<img id="img2" src="images/haut.png" />
<img id="title" src="images/nom.png" />
<img id="logo" src="images/LOGO.png" />
<div class="boutonsim" style="right: 80px;" name="boutonachat"> <!--image-->
<img src="images/clipart/boutonORIGINALachat.png" /> <!--vrai bouton-->
</div>
<button id="boutonachat" style="right: 80px;">Billets</button>
<div class="boutonsim" style="right: 280px;" name="boutonculture"> <!--image-->
<img src="images/clipart/boutonORIGINAL.png" /> <!--vrai bouton-->
</div>
<button style="right: 280px;">Culture</button>
<div class="boutonsim" style="right: 480px;" name="boutonpaysages"> <!--image-->
<img src="images/clipart/boutonORIGINAL.png" /> <!--vrai bouton-->
</div>
<button style="right: 480px;">Paysages</button>
<div class="boutonsim" style="right: 680px;" name="boutonaccueil"> <!--image-->
<img src="images/clipart/boutonORIGINAL.png" /> <!--vrai bouton-->
</div>
<button style="right: 680px;">Accueil</button>
</div>