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 trialmichael Radvany
2,074 PointsHow do you do this? Next, transition the right property of .icon over a duration of .4 seconds.
Next, transition the right property of .icon over a duration of .4 seconds.
Can you please give me all the steps to the challenge ?
best regards
Sheer
.nav-item {
transition-property: flex-grow;
transition: .5s;
transition: right .4s;
}
.nav-item:hover {
flex-grow: 2;
transition-timing-function: ease-out;
}
/* nav icon transitions ---------- */
.icon {
right: -25px;
}
.nav-item:hover .icon {
right: 12%;
}
<!DOCTYPE html>
<html>
<head>
<title>CSS Transitions</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="page.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<nav class="nav">
<a class="nav-item" href="#">About <i class="icon material-icons">person</i></a>
<a class="nav-item" href="#">Work <i class="icon material-icons">work</i></a>
</nav>
</div>
</body>
</html>
2 Answers
Jamie Reardon
Treehouse Project ReviewerYou have placed this part of the code inside the first rule of your css. Move it into the icon rule as it states in the challenge the element it wants you to style.
Guil Hernandez
Treehouse TeacherHi michael Radvany,
It looks like your transition
declaration is spot on, but it's inside the wrong CSS rule. If you move transition: right .4s;
from the .nav-item
rule to .icon
, that should do it.
Hope this helps! :)
michael Radvany
2,074 Pointsmichael Radvany
2,074 Pointswhich part of the code? where? i do not understand .
can you give me the answers to 3, 4, and 5?