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

Christian Kristoffersen
Christian Kristoffersen
32,531 Points

Can't seem to figure this one out :( Transforms Challenge

Can't seem to figure this one out :(

style.css
/* Complete the challenge by writing CSS below */


.badge {

   -webkit-transform: rotate(15deg) translate(-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>

1 Answer

Sean T. Unwin
Sean T. Unwin
28,690 Points

Hi Christian,

There a couple of issues here.

  1. The negativity of the values should be reversed. (hint: counter-clockwise usually means a negative degree)
  2. translate takes 2 parameters -- x and y. Alternatively, since the request is to move down we can use translateY.
Christian Kristoffersen
Christian Kristoffersen
32,531 Points

Arh thank you very much! Stupid mistake, but you were a big help, Sean! Kind regards!