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
Brian Wassel
22,171 PointsUsing the -webkit- prefix, set a 2.5em gap between the columns.
im confused on how to use the webkit prefix. i know how to set the gap, and i understand ems. but i dont know how to do it using a webkit prefix... SOMEONE HELP PLEASE.
3 Answers
William LaMorie
11,769 Pointsthe webkit prefix targets browsers that use the webkit engine and its decedents (used by Chrome, Safari, and a slew of mobile device browsers).
Generally, if I recalled, a prefix is needed for a CSS property when it's still "in testing" or "in development" for a given browser engine, but already out in the wild.
Generally, in the real world, properties that are in development for one browser engine often are for others as well, so you'll see something like:
-webkit- property: value;
-moz- property: value;
-ms- property: value;
-o- property: value; (although opera moved to blink, which is a webkit fork, so -webkit- works for newer versions)
property: value;
which will cover most of the big browsers, and should be future proof as well.
Here's some more info on webkit: http://en.wikipedia.org/wiki/WebKit
And here's a good (but dated) stack overflow piece on it: http://stackoverflow.com/questions/3468154/what-is-webkit-and-how-is-it-related-to-css
And here's a wonderful site for checking what you can use with every browser, and if it needs to have a prefix: http://caniuse.com/
Jesus Mendoza
23,289 PointsAs far as I know, the -webkit- prefix dosn't change anything in the CSS. It just help the brower to "understant" that CSS property.
Isak Aslund
9,748 PointsMendoza is correct on how the -webkit prefix helps the brower understand. Different web browsers use different prefixes that helps them understand the code. The "new" css properties such as flex box often need a vendor specific prefix for it to understand the code. So by putting the -webkit prefix in your code the browsers that use -webkit will understand your code. If you would do the exerice it would look something like this: -webkit-column-gap: 2.5em;