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

HTML HTML Forms Choosing Options Select Menus

adding a form to original project if possible

is there a way to scale this form down to the contact page of the original project, i would imagine I would have to tinker with the css

2 Answers

Tyler Dix
Tyler Dix
14,230 Points

Yes. Without seeing your code, I'll do my best to help.

Assuming the form is wrapped in a div, set the width of the div in your CSS. For example, if your markup looks like this:

<div class="form"> <!-- the class of "form" I just made up.  You can use any class you'd like -->
  <form>
    Your code here
  </form>
</div>

Then to scale the form down, in your CSS do this:

.form {
  width: 400px; /* adjust this to your liking */
}

This tells the browser to make all contents in the div container with the class "form" to be 400px wide. You can tinker around with this value until you find it suitable.

Hope this helps.

Cheers,

Tyler

You could always just add the class .form to the form element and do away with the extra wrapping div.