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
Tom Pickles
787 PointsMaking a box expand with another box (simple, right?)
as you'll see from the attached codepen code, i have a box outline, with a red box inside it. when i change the width of the inner red box using jquery, i want the outer box to expand with it. any ideas?
http://codepen.io/anon/pen/cngtr
thanks.
1 Answer
Michael Lyons
11,031 PointsRemove
" top: 200px; left: 0;"
From your box style.
Might be more things you could do, such as use responsive design and transfer your px into %.
That's one way to do it at least.