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


Brandon Brigham
Brandon Brigham
3,716 Points

How do I not have my text overflow my box?


If you go to this site I'm working on :


Underneath the name Jennifer...... There is a site URL and it overflows the dark grey container. How do I get either the text to wrap or make the grey container adjust to the text length...


2 Answers

When I went in the dev tools and took out width: 100%; it worked. 3595 is the line I removed

It might also help if you have the whole thing as an anchor tag e.g

<a href="#">Your Link</a>
Davy Wong
Davy Wong
25,470 Points

Chrome DevTools to the rescue. You should watch this track to learn how to use it. http://teamtreehouse.com/library/website-optimization

Using DevTools, you can inspect the URL and see that it belongs to an unordered list element with a width of 377px. Change that to 100% and you're all set.

The CSS selector and rule is :

.speakers-folow ul { width: 377px; }

Just to clarify, this solution is to make the URL wrap itself to keep within the dimensions of the gray container. Carman's solution above is to increase the width of the gray container to accommodate the width of the URL.