Is there a way that “a” does not affect texts inside the div? Just the div itself?
I dont want them to be underlined. And no, i cant change “a”‘s text-decoration to none, because i need it for regular links.
<a href="#">
<div style="smthing">
<span>text</span>
<span>text</span>
<span>text</span>
<span>text</span>
</div>
</a>
thanks
Yes, use the direct child selector
>It will only affect “the
divelement which is a direct child ofaelement”Note that some properties have
inheritas a value by default. Those properties will need to be overridden.