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

Flexbox in Safari?

I'm a bit confused about flexbox support in safari. According to caniuse.com flexbox is supported (at least partially) from 3.1 onwards. I used the Autoprefixer plugin for Sublime Text to generate the prefixes for 7 versions back however the code below won't work in Safari 3.1.7 and other older versions. Can anyone shed some light on the issue?

#menu-stills-sub-headers {
    z-index: 99999999;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flexbox;
    display: box;
    display: flex;
    height: 100%;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    width: 95.68%;
    -webkit-box-align: center;
    box-align: center;
    box-pack: justify;
}

#menu-stills-sub-headers li {
    -webkit-box-flex: 1;
    box-flex: 1;
}

The website is www.jamespeachey.co.uk/stills

2 Answers

I'm not super up on flexbox right now myself, but it seems like you have some depreciated flexbox properties, which is probably the problem.

For instance, according to MDN https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-box-pack

Box-pack and box-align are no longer supported by browsers. The flexbox syntax has gone through a couple of revisions, and I think one just happened lately.

Yes but I have used the latest syntax as well as the old syntax and it still doesn't work which is strange. If only everyone had the latest browser :/