0

I'm trying to make a transition for a <div> and I have two different children in it. How do I make a transition for both children at the same time on hovering the div?

When I do this it makes the whole <div>, including the content, bigger. I want to be bigger just the content of <div>.

<div class="subtitle">
    <i class="big fa-solid fa-user-group"></i>
    <h2 class="big">Personal details</h2>
</div>
<style>
    .subtitle:hover {
  transition: all .2s ease-in-out;
  transform: scale(1.1);   
    }
</style>
Mark Rotteveel
  • 90,369
  • 161
  • 124
  • 175
Gheorghe
  • 3
  • 3
  • If you only want `.subtitle .big` to get big then make your selector `.subtitle:hover .big` like the marked-as-duplicate answer indicates. – nzifnab May 05 '22 at 20:10

0 Answers0