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 trialGustav Svedung
3,227 PointsStrange CSS Flexbox flex-wrap issue in Safari. Bug?
Has anyone else experienced issues in Safari, when using Flexbox and flex-wrap: wrap? I've built a site which displays album covers + info text, and it's supposed to wrap this context in columns on large screens. It works fine in Chrome and Firefox, but Safari (OS X and iOS) just refuses to wrap, and instead displays one long line.
My site can be viewed here: http://htmlpreview.github.io/?https://github.com/gustavsvedung/By-Heart-Rec/blob/master/index.html
Here's the code section, in where I assume the issue lies: @media screen and (min-width: 801px) {
/* flexbox */
#artists,
#releases {
display: flex;
flex-wrap: wrap;
}
.artist,
.release {
flex: 1 0 0%;
}
/* design */
body {
max-width: 1024px;
}
#about {
font-size: 1.2em;
}
.artist,
.release {
padding-left: 2em;
min-width: 370px;
max-width: 600px;
}
}
1 Answer
Gustav Svedung
3,227 PointsI found a solution on Stack Overflow – this is apparently a bug in Safari (when involving min-width, as I have). I solved my layout in Safari by adding "flex-basis: 50%;" to my artist and release classes.