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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![abdul faiz mohd jayramie eng](https://secure.gravatar.com/avatar/a777e1d249c63ecf2b0ea002fd0b49e8?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
abdul faiz mohd jayramie eng
Courses Plus Student 4,478 PointsCSS3 transition border-radius?
i dont think there is such transition for border-radius property. i'm having a little trouble on my current project for my navigation bar. What i am trying to achieve is when user mouseOver my navigation links, a CSS3 transition should occur. Such as:
.btn:hover {
padding: 10px 15px 10px 15px;
color: white;
background-color:#523F44;
border-radius: 100px;
}
here is my navigation transition code:
div.nav a {
-moz-transition: all .51s;
-o-transition: all .51s;
-webkit-transition: all .51s;
transition: all .51s;
}
what i am actually trying to achieve is, to create a transition for border-radius + color property to be visible when user mouseOver. My problem is, although its pretty minor, when set Transition to ALL, it will add transition to my mouseActive, such as:
.btn:active {
background-color: #977985;
}
i do not want transition to occur when mouse is activate. how do i work this around? there is no border-radius property in CSS3 transition.
8 Answers
![Guil Hernandez](https://secure.gravatar.com/avatar/bad4b01a177d5803f443e11fa7d55c59?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Guil Hernandez
Treehouse TeacherHi Abdul,
Nice work on the nav transitions! If you're trying to remove the transition on active, you can add the following:
.btn:active {
background-color: #977985;
border-radius: 50px;
-webkit-transition-property: none;
}
Also, the keyword value βallβ is the initial value for "transition-property" , so you can actually leave it out in your animation declarations. Hope this helps!
![James Barnett](https://secure.gravatar.com/avatar/43ea08b4fc547e8a5da87c207bea2123?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
James Barnett
39,199 PointsCan you post a "working" example using codepen.io?
![John Riordan](https://secure.gravatar.com/avatar/042a2838116378d1a8e7dd875123faf6?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
John Riordan
Courses Plus Student 834 PointsYour selectors look a little funky. I'm not sure what your markup looks like but I'll make a little example.
nav ul li {
padding: 10px 15px 10px 15px;
color: white;
background-color:#523F44;
border-radius: 50px;
-moz-transition: all .51s;
-o-transition: all .51s;
-webkit-transition: all .51s;
transition: all .51s;
}
And on hover...
nav ul li:hover {
border-radius: 50px;
}
Note place your transition properties in the selector that you're using to style your navigation normally, and just state which property that you want to change in the :hover selector.
Maybe this will help? http://codepen.io/john-riordan/pen/sIyuL
Good luck!
![abdul faiz mohd jayramie eng](https://secure.gravatar.com/avatar/a777e1d249c63ecf2b0ea002fd0b49e8?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
abdul faiz mohd jayramie eng
Courses Plus Student 4,478 Pointsthanks guys!! but..its not quiet there yet. What i am trying achieve is to eleminate the transition for active. My mistake, i should post a sample website along with the codes. I never tried codepen, i copied sample from my project, here: http://codepen.io/faizarmani/pen/peyBc
btw, my markup is a mess! Look up from line 166, you'll get the idea from there.
![James Barnett](https://secure.gravatar.com/avatar/43ea08b4fc547e8a5da87c207bea2123?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
James Barnett
39,199 Points@John - That's a slick example I like it :)
![JP Nothard](https://secure.gravatar.com/avatar/e0a03155623200f14e9caf9412d1d1c4?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
JP Nothard
3,846 Pointsyou could try this
.btn:visited { background-color:#523F44; }
![abdul faiz mohd jayramie eng](https://secure.gravatar.com/avatar/a777e1d249c63ecf2b0ea002fd0b49e8?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
abdul faiz mohd jayramie eng
Courses Plus Student 4,478 Pointsalmost there, but that eliminate the whole color for active. what im into is to avoid transition for active and preserving its current applied color. thx btw, kinda interesting to see what it does with that solution.
connorkent
2,327 Pointsconnorkent
2,327 PointsThis problem has made one of the code challenges in the html track impossible to complete. You would expect a solution to pop up 2 flipping years after this problem emerged, but nope. Thanks Bill Gates. :)