Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS CSS - Beyond the Basics Understanding CSS Transitions and Transforms Transforms Challenge

HELP STUCK ON THIS CHALLENGE

I dont know what I am doing wrong

style.css
/* Complete the challenge by writing CSS below */
.badge {
  -webkit-transform: rotate (15deg);
  -webkit-transform: scaleY (50px);
}
index.html
<!DOCTYPE html>
<html>
<head>
    <title>Transforms</title>
    <link rel="stylesheet" href="page.css">
    <link rel="stylesheet" href="style.css">
</head>
<body>
  <img class="badge" src="css-badge.png">
</body>

2 Answers

You are definitely on the right track. One, remove the gaps between the value and its paremeters. Also, it's looking for 15 degrees counter clockwise, the way you have it right now is clockwise, so in order to go the opposite direction we have to make it a negative value, thus -15deg. Next, it's asking us to move it down by 50px, so we know that it is on the Y axis as opposed to the X axis. However, you are using scale when in fact you want to use translate, to be more specific translateY, this will allow us to move it down the Y axis at the 50px we specify. Lastly, you can combine both of those into one transform property - value declaration and just have them comma separated, you do not need to have them separate, that would actually cause the last transform declared to be the only one applied.

.badge {
  transform: rotate(-15deg), translateY(50px);
}

Hi Shayla,

Without giving you the exact answer the challenge is asking for you to:

Give the .badge element a transform that rotates it 15 degrees counterclockwise...

You are currently rotating it clockwise instead of counterclockwise. It's also asking for you to:

...and moves it down 50px.

You're currently scaling it. Try changing the scaleY to an alternative.

Here's the info you'll need from w3schools.

Hope that helps :)

-Rich