Scale an Element on Hover

Scale an Element on Hover
0

#1

Tell us what’s happening:
Im not sure what im doing wrong, i need to make the object smaller when user hovers over it.

Your code so far


<style>
  div { 
    width: 70%;
    height: 100px;
    margin:  50px auto;
    background: linear-gradient(
      53deg,
      #ccfffc,
      #ffcccf
    );
  }
  div:hover {
    transform: scale(1.1):
  }
</style>

<div></div>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/applied-visual-design/use-the-css-transform-scale-property-to-scale-an-element-on-hover


#2

I think your problem is the : after the scale section. Should be a ;


#4

i fixed my mistake but it still doesnt work? any ideas


#5

I’ve just tried it and all works using the below code:

    div:hover {
    transform: scale(1.1);
  }

#6

It worked, its bugging me i dont know where i was going wrong


#7

All lines of CSS must end with a ; but your line initially ended with a :

That’s the only thing I could see that was wrong