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 trialChris Ascencio
8,785 Pointsfocus won't work
focus won't work when i hit tab on my mac.
here my code... https://w.trhou.se/cl05mzmhf2
4 Answers
Ernestas Sipavicius
6,327 PointsThe :focus selector is allowed on elements that accept keyboard events or other user inputs.
input:focus { background-color: yellow; }
Nick Johnson
11,194 PointsWell you need to focus on your work. HAHA
Chris Ascencio
8,785 Pointsso how do i replicate what Guil did in the episode?
Ernestas Sipavicius
6,327 PointsIt's working for me. You click on the link? What browser you using? image: http://postimg.org/image/3p5qtvtc1/
Patrice Anoh
8,577 PointsChris, you need to use the TAB button on your keyboard to jump to each link on the page. focus rules will then work.
Christian Colella
2,599 PointsSo the Focus psedo-class works fine with Chrome. What would be the reason why it does not work with Safari? When I hit the tab key it selects some browser options up top including search bar.
kabir k
Courses Plus Student 18,036 Pointskabir k
Courses Plus Student 18,036 Pointsfocus won't work for me either.