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 trialwatermelon8
2,015 PointsThe overarching practice of old layout methods. To use or not to use?
So, this topic is always itching at the back of my mind as I'm going through the very foundations of CSS layout: floats, media queries, box model, positioning, yadda yadda...And thinking about future lessons as I advance into more current layout techniques.
Experienced people have always recommended going through the basics first. This is something I agree with. However, when it comes to new layout techniques such as CSS Grids, Flexbox, and other frameworks; should I be making it a habit in my mind as I'm learning the old stuff that methods like floats were an old hack not intended for layout and newer methods like Grids should be the standard norm moving forward?
I guess I'm still really struggling to understand how accepted or "best practice" is the Grid or Flexbox model, for example. Everywhere I hear is that accessibility comes first, and if a fairly new feature is still not accepted by a user in Cambodia using a 2008 browser, you shouldn't be using it because everyone should feel included.
There's also a recurring argument about abusing these newer tools to mold the web into something it wasn't intended for, like print in graphic design. But my question is, if these new tools are becoming more common and accepted in browsers, why not make the web more beautiful and unique? Why does everything have to be as expected?
Jen Simmons, a Mozilla Designer/Developer has always been an evangelist of softening the current rigidity of the web and its limitations. She has a great Youtube Channel where she favors more flexibility with layout using newer methods like Grid.
Thoughts?
1 Answer
Sam Gord
14,084 Pointsi think you can use whatever method u want as long as u check the browser support for it in https://caniuse.com i personally use Flexbox over any layout technics . it's easy , it's so responsive friendly and u don't need to include any other files or links like u need to do with bootstrap , it's just pure css . about floats , the only situation i can think of where u can use that is when u wanna put text around an image . or at least that has been the only situation that made me use it.
my life has been so much easier since i've learned Flexbox! :D
happy coding ;)
watermelon8
2,015 Pointswatermelon8
2,015 PointsOh my god, I'm so glad you said that because I really hate floats! I started learning CSS in 2009, back when tables were still in. But never stuck with it consistently. Most of it was my frustration in having to be forced on outdated methods to hack my way into a layout using clearfixes and the table element. It was terrible! As a designer I hated it! It was confusing and it never worked. So I crucified the entire development processes and quit. It's been almost a decade. A lot has changed so I'm giving it another go. I really hope that later lessons on new CSS layout methods actually get me excited about it rather than hinder me.
In that respect, I want to mention that in my partner's experience (he's also a designer), he works for an insurance company and has found it very aggravating working with his company's audience. A lot of them are older people and businesses using old systems. He has to consistently reinvent his designs in order to fit the demographic while faking an updated look, so I know that the "old web" hasn't gone away completely. He always tells me he's hesitant in using modern grids in his work for fear the developers might have his head on a platter. So I guess that means the developers never heard of Flexbox?
Maybe. ?
Thanks.