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
Melina Q
1,479 PointsA few questions about layouts.
How do you decide what type of layouts you'll use? For example, I'm trying to create a few test websites just to practice my skills and I always find myself asking if I should implement "floats" , or "display:inline-block" (or both?). That's another doubt, ΒΏcan I mix both of them or are they mutually excluse? I know I could do it, but I was wondering if it might bring some issues.
Also, as someone who's learning, I know I should learn how to use all of them (I mean floats, display, flexbox, grids..) but which one would you say I should focus on? Thanks!
1 Answer
geoffrey
28,736 PointsHey Melina,
That's a good question, I'm not an expert yet, but If I don't tell stupidities, float was first used to create webpages layout, then display:inline-block has come, but nowadays, from what I see, most people tend to use display:inline-block. At least, that's what I think....
However, you can still mix both, for instance, you could have your columns laid out using the display technic and inside them, why not having an icon displayed alongside a parapgrah using float. The downside with floats as you know is probably the fact you have to use a clearfix...
I hope an experimented person could confirm this because I'm really interested in this as well. But to me, that's more common now to use the display property.