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 trialMalcolm Stretten
3,814 PointsMy flex containers DO still re-align themselves into a different format
Guil says that with the css shown below that the items will stay in ever narrower columns. This is NOT what I found. Has anyone else found this? Have the browser specs changed maybe since Guil did this? /* ================================= Flexbox ==================================== */
.container { display: flex; flex-wrap: wrap; }
.item { flex: 1; }
vftwm
17,516 PointsWhen you add "overflow: hidden;" to the ".item" you get the same effect as Guil. In his example some letters seem to disappear behind the div borders. Maybe "overflow: hidden;" was included in the shorthand back then? I don't know.
Saqib Ishfaq
13,912 Pointssame issue, and surprised to read all this here that, no one has been able to resolve it since this was posted almost a year ago!! using chrome(Version 62.0.3202.89 (Official Build) (64-bit))
9 Answers
docgunthrop
12,445 PointsI get the same thing. In the video, starting from around 3:50, after Guil sets the 'flex' value to 1 for the 'item' class, his example doesn't break into multiple rows. My flexbox.css is identical to his, but at a certain point, when each flex item gets to around 90px wide, it breaks into multiple rows.
Perhaps it's a change in HTML5 rule behavior? I'm not sure how long ago this course was made.
Robert Papancsev
3,420 PointsSame issue here with Chrome. Nobody want to correct the video?
Steven Parker
231,236 PointsI can make those columns really narrow.
Do you have some long words or something of fixed size inside your items that force them to wrap?
Malcolm Stretten
3,814 PointsNo- I was just following along with Guil's tutorial. The text/coding is identical to Guil's as far as I can tell.
Jamie Cairns
3,604 PointsIt still wraps to a new line. I'm assuming as there are a few others that have said the same, this must be something that has changed since the video was made.
Lili Köves
3,471 PointsFound the same, when it gets to narrow for the longest word to fit, it breaks the layout into multiple rows.
ywang04
6,762 PointsThe flex items still break on a different line when narrowing the browser using short hand flex in Chrome(Version 61.0.3163.100 (Official Build) (64-bit)), which is very confusing.
The same problem was discussed here. No conclusion. :(
Chris Komaroff
Courses Plus Student 14,198 PointsSame problem for me. This wraps about about 100px:
.item {
flex: 1;
}
This also wraps at 100px:
.item {
flex-grow: 1;
flex-basis: 0px;
}
Both my chrome and safari do this. I don't get ever narrowing behavior as in video.
Gilad Goldman
5,639 PointsSee my answer in this thread
David Pretlow
Front End Web Development Techdegree Student 8,603 PointsDavid Pretlow
Front End Web Development Techdegree Student 8,603 PointsI'm having the same problem