Suppose to have this html:
<a href="" class="hoverelement"><span>DOG</span></a>
I need to increase size of string "DOG" So I use this css:
.hoverelement span:hover {
font-size:20px;
}
But this does not work? Can anyone help me?
You need to add !important
in span's css
, because it may be inherited by it's parent's rule.
.hoverelement span:hover {
font-size:20px !important;
}
<a href="" class="hoverelement"><span>DOG</span></a>