I have something like this:
<div class="parent">
<div>Normal item</div>
<div class="special">Special item</div>
</div>
Now I want to set the opacity to 50% when I hover over the div.parent, but I don't want this to effect the Special item.
I tried the following:
.parent:hover {
opacity: 50%;
}
.special {
opacity: 100% !important
}
But this doesn't work, is there someway to select that the .special children always have opacity: 100%?
EDIT: I now tried the following
.parent:hover {
opacity: 50%;
}
.parent:hover .special {
color: white;
opacity: 100% !important;
}
The Color changes to white, but the opacity isn't affected.