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

Can inline-flex containers take margin, padding, width and height values?

Since Guil said here that flex containers with the display: inline-flex property attributed to them act like inline elements does that mean that these elements can't take margin, padding, width and height properties?

1 Answer

I wasn't really familiar with display: inline-flex but I did a little research and apparently you can add margin, padding, height and width to inline-flex. I found this codepen that I could try different settings in. Honestly, I'm not really sure where inline-flex would come in handy, but maybe at some point!