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 to Make a Website Styling Web Pages and Navigation Style the Image Captions

Raghav Agrawal
Raghav Agrawal
4,654 Points

text inconsistencies

why the text is coming out of the parent container when the browser windows is resized?

here is my html and css output

2 Answers

Samuel Rueby
Samuel Rueby
22,538 Points

Here's a fiddle demonstrating hiding text overflow when it flows out of the container. http://jsfiddle.net/9W86L/

If you're confused why text is overflowing at all, it must be because the container's width/height is set, which won't allow it to expand to fit the content. Browsers also won't break between letters in a word, so if a single word doesn't fit the container, it overflows.

Markus Ylisiurunen
Markus Ylisiurunen
15,034 Points

Hi,

You could try to set the parent container's overflow property to none. This will hide all the text which goes over the border of the parent container. If this is not what you wanted to do, please describe your HTML code a little more.

Raghav Agrawal
Raghav Agrawal
4,654 Points

thanks for this and for the reply on my footer problem sir