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

Emma Willmann
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Emma Willmann
Treehouse Project Reviewer

Link and User Action Psuedo-Classes Video

Around the 8min mark of this video (in the CSS Foundations:Selectors section), Guil starts talking about the Focus psuedo class. In the css file, he gives a yellow background to input:focus. When he switches to the browser, the links get the yellow background, not the form text boxes. When he switches back to css, it now shows a:focus.

Is this just a mistake in the video editing?

1 Answer

Dave McFarland
STAFF
Dave McFarland
Treehouse Teacher

Good catch Emma. You're right, this appears to be a mistake in editing.

:focus {

}

Selects any element that's capable of focus: links, form fields or ANY HTML element that you add the tabindex attribute to.

To style focussed form input fields you'd use this selector

input:focus {

}