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

CSS

How do I get textarea elements on forms to stay at 100% width through all breakpoints? Bootstrap is involved..

Here is a link to a codepen: http://codepen.io/anon/pen/ZOzJay

I believe the solution lies somewhere in bootstrap's breakpoint code for the various form classes..

Problem: When the screen resizes to anything above a mobile view, the textarea reduces in size and moves to the left of the container. I'd like it to stay at 100% width through all bootstrap breakpoints. Any help would be most appreciated! Thank you in advance for any time you spend on this.. and for being brave... forms suck. :P

Hey Kevin, the syntax in these divs: <div class="form-group .col-sm-6">

should be instead:

<div class="form-group col-sm-6">

Then to answer your main question also look here for the same issue: <div class="form-group .col-sm-12">

I'll see what I can find out about the textarea element.

Thank you Mark for catching that syntax problem! It is corrected, however, that did not fix the original problem : /

The textarea field still doesnt occupy the whole width when resizing

Thank you very much!

1 Answer

In textarea.form-control add min-width: 100%;