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.

HTML HTML Forms Organizing Forms Fieldsets and Legends

Edouard Winia
Edouard Winia
3,257 Points

From basics / organizing form : actual width of form larger than max-width set, how can it be ?!

Hi !

I had a quick look at the CSS set up for the form in the "organizing forms" of the "Form basics" section.

If you check with google dev tool the selector <form> it's indicated that it has a width of 440px while in the CSS file it's written : form {max-width: 300px; }.

Besides at the very begining of the CSS file it's indicated that we are in the "box-sizing : border-box" mode which implies that margin and padding should be included in the max-width of 330px.

Does anyone has a clue on that ?

Best, Edouard

2 Answers

Niclas Valentiner
Niclas Valentiner
8,947 Points

Does the CSS in the file after the rule for form apply? The rest of the css file?

Sounds to me like the css file itself is broke or breaks at some point.

Edouard Winia
Edouard Winia
3,257 Points

Ok sorry, there was a media query I missed.. :

@media screen and (min-width: 480px) {

form { max-width: 480px;

Thanks for the answer, sorry for disturbing.

Niclas Valentiner
Niclas Valentiner
8,947 Points

That'd make the change, heh. Glad you found the solution.