Problem with color
-
Hi,
I would like my text to turn black when hovering over another text
But it doens't work on my website, text color and size don't change.
Here is a link about my page :
https://ateliercortile.com/accueil-2/Here is my CSS :
.scenographie1:hover ~ .scenographie2 {
color: black!important;
font-size: 30px!important;
background: #ccc;
}I tried to put !important but it doens't effect nothing.
However the background appair in grey as i want, why not the rest ?
Thank youu
-
i think ure using the wrong css selector
i think this one is correct:
https://developer.mozilla.org/en-US/docs/Web/CSS/Adjacent_sibling_combinatorwhen inspecting the html make sure u target the right .col , the html elements you target need to be siblings, meaning they need to be in the same parent element and next to each other
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login