0
I am doing a project where I am creating several different button styles, created buttons with class names like "button-default", "button-default-Empty". The problem is that I can’t get the first class css to be applied to the others, I can’t change the property to:Hover these classes.
.button-default{
background-color: #49bf9d;
border: 2px solid #49bf9d;
color: white;
padding: .75em 1.5em;
border-radius: 5px;
font-size: .9em;
}
.button-default-empty{
background-color: white;
border: 2px solid #efefef;
color: inherit;
}
.button-default-empty a:hover{
color:#49bf9d;
background-color: #49bf9d;
}
<label for="nome">Nome</label>
<textarea name="mensagem" id="mensagem"></textarea>
<input class="button-default" type="submit" value="Enviar">
<a href="#" title="limpar" class="button-default-empty">Limpar</a>
You need to specify your problem better, the style is being applied correctly. Your
hover
is not working because the correct would be:.button-default-empty:hover
.– fernandosavio
I’m actually doing a font-end course and in this course the teacher created these 2 classes, the difference in his second class porjeto inherited all the definitions of the first just by changing what was added in the second class, I tried to do it the same way but as you can see it didn’t work
– Reignomo