Use the CSS Transform scale Property to Scale an Element on Hover, by Suri

Tell us what’s happening:

im stuck

keeps saying ‘The size of the div element should scale 1.1 times when the user hovers over it.’
Your code so far


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

<div></div>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36.

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/

Do you have a question?

keeps saying ‘The size of the div element should scale 1.1 times when the user hovers over it.’

hover {transform:scale(1.1);}
  }

Something is missing. The hover should be applied to div elements. Look closely at the example for paragraph elements.

thanks, got it, coding can be frustratingly tricky

Your code would be: @Suri

3 Likes

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