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)
![Dennis de Vries](https://secure.gravatar.com/avatar/b898f6aeb3f09db957dc20e836e26bfd?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Dennis de Vries
9,440 PointsStyling form elements more difficult? (From the extra credits part)
Hi everyone!
I dove into the extra credits part of this course. It says: "Styling form elements can be slightly more difficult than other types of HTML elements. "
Thing is, though, when I look at the CSS, it all looks pretty straightforward, even to a n00b like me. (who only has CSS-basics)
I couldn't quite figure out what makes styling form elements any different than styling other html-elements in CSS. Any thoughts on that?
Thanks!
1 Answer
![Craig Watson](https://secure.gravatar.com/avatar/8b29b9958fc4a96373d0b502670b3973?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Craig Watson
27,930 PointsHi Dennis,
I may well just be the slightly more complex selectors you can use to style different form states like, active, focus and so on. You are moving from some thing like a class for your for text input field to what might be a disabled button or focused email input for example.
I would pretty much say it is all based around selectors though, nothing is really going to catch you out :)
Examples would be:
input[type="text"][disabled]:hover {
background: darkgrey;
}
there are many combos of this type of selector in relation to forms to so that could be it to :)
Hope this helps Craig
Dennis de Vries
9,440 PointsDennis de Vries
9,440 PointsIt does, thanks!