Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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