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

I feel this course was done arbitrarily in favor of a preferred method of designing. I never really understood, "why"?

Maybe I am simply wrong or don't have enough experience but having taken other courses in and outside of treehouse, it seems like there either isn't enough explanation or there is merely a preference in designing css style. Beats me.

Hi James, I'm probably not as seasoned as you so pardon the question. What other ways of styling html are there? I guess I hear there are frameworks, but they are all based on css, aren't they?

Well, he did say there are several ways of designing a layout while altering the display property of default tags but by 'default' you'd think we could design a page without having to alter tags altogether albeit, that be rather difficult. Maybe I need to keep watching there are many more videos. Floats have many options too .

Hi again, There are always many ways to style pages, but I think they all involve CSS. You mentioned float. There are at least two other options that do that type of thing. Inline-block and Flexbox, both of which I'm pretty sure are part of CSS.
So if your point was there are other ways to do layout, there are so many, by the time you're done you may wish there weren't :D And yes, float is an older technique from what I understand.

1 Answer

Not 100% sure what course this is directed at, but yeah I'd say CSS styling conventions are a lot more looser than Javascript, Python, Ruby, etc. There's likely linters for CSS, but not sure how many people are using those. Designing modular CSS is quite difficult, and even when using the templating features from SASS, it can still be a challenge. Good quality, modular code between Javascript, Python, and Ruby is similar because they all follow the same principles: divide problems into small chunks of functions either on their own or in OOP, in a class. That way they're easily testable and much more maintainable. CSS is a different ballgame because it's a lot harder to plan for future expansion and css classes than with a functional programming language. Learning to design highly modular CSS (use Sass) comes with experience, but for starters, here's a good lead for you to start digging into: https://smacss.com/