Kevinvhengst
Kevinvhengst

Reputation: 1702

less css opacity child

SO i started using LESS CSS. Now i have a parent div with opacity: 0.8; I want the child to have opacity: 1;

So i created this:

.offerte{
    font-family: BrushScriptRegular;
    font-size: 34px;
    background-color: black;
    opacity: 0.80;

    a:hover {
    border-bottom: @underlineBorder;
    opacity: 1;
    }
}

I got told that this should overwrite the parents opacity in LESS. But this does not work for me. Any other solutions with LESS how to deal with this?

thx in advance!

Upvotes: 1

Views: 219

Answers (1)

SaurabhLP
SaurabhLP

Reputation: 3657

Their are some serious changes to your code, have a look,

.offerte {
    font-family: BrushScriptRegular;
    font-size: 34px;
    background-color: black;
    opacity: 0.8;
    &:hover {
    border-bottom: @underlineBorder;
    opacity: 1;
    }
}

I support offerte is a class of an anchor which hover down, if it is, then you should do these modifications... Thanks...

Upvotes: 1

Related Questions