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
No overflow for my flexbox.
Hello, at the end of video, before using the function -webkit-flex-wrap: wrap; Guil show that the list item are not wrapped inside the nav class: in fact the overflow!
When I've tried this in my computer, and resize the browser my elements stay inside the nav.
Question: Is it possible that with new Chrome version there is no more overflow for flexbox? If not, why my list items don't overflow as in the video?
Thanks in advance.
My current version of Chrome is v. 39.0.2171.95.
Matt Varner5,373 Points
TL:DR? - I may have solved this mystery...please see the latter part of this post for the solution (that works in my Chrome now)
Devin, I'm certain that the code Dario is referring to is the following:
This CSS snippet is styling a nav element made up of several unordered list items, converting it to a 'flexbox.' In the lesson, Guil Hernandez says the following:
"In our HTML file, if we add more list items to our unordered list, we can see how the boxes are still evenly distributed on the page. I'll go ahead and remove these auto margins here so we can see how the space is still evenly distributed between all six list items. They are, however, not wrapping within the flex container. As we can see here, they are overflowing. We can easily take care of that with the "flex-wrap" property."
The following images (if my meager Markdown skills are not too faulty) illustrate the issue of the flexbox items not overflowing by showing how it should look (the Codepen GIF), and how it is behaving in Chrome (my version is 40.0.2214.111 m)
Since the flexbox is not, in fact, overflowing...the wrap syntax is not doing anything at all, and it's a little confusing whether or not there should be new syntax to compensate for the change. I'll be looking for a solution, but maybe this will help flesh out the problem, I'm hoping.
:: crosses fingers ::
Edit: There does seem to be some issues related to how overflow behaves in Chrome and maybe even Firefox. A very non-exhaustive list of information that I am beginning to find about the subject is:
Edit: SUCCESS - It seems that a current workaround is to include the following code alongside the other flexbox declaration elements:
Snippet to use in your element:
I just tried it in Chrome and I am now seeing the expected behavior. Here's the GIF: