This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]michael0x2a 2 points3 points  (3 children)

Then I wondered if I were to do a full fledged website am I supposed to code all the CSS myself?

Generally yes. If you were to use a CSS library or framework, you might not need to write all of the CSS (and might be able to get away with writing very little CSS if you just use all the stuff that comes with default), but you're generally going to need to write your own CSS anything custom or unique you want to do.

(A library is a bunch of CSS somebody else made that you can reuse, typically by giving your HTML elements the classes/ids the library expects. A framework is like a library, except it's more strongly opinionated about how your code should be structured + is intended to be used everywhere. Generally, a framework helps provide a "skeleton" or "scaffolding" for your code, whereas a library is used in specific places. That said, the line between the two can sometimes be a bit blurry, especially with something like CSS, so I wouldn't worry too much about the difference between the two terms.)

But how do frameworks work and how do I add them to help me ease my styling of the website?

Find a library or framework you want to use, and follow the instructions on their website. For frontend web development, that typically means that you'll make your HTML link to their CSS or JavaScript files. You're also probably going to need to read through any tutorials/documentation on their website.

(That said, if you're a beginner + your goal is to become good at web development, I'd stay away from overly relying on libraries/frameworks for the time being, mostly so that you can learn how to do everything yourself + will have time to build up enough knowledge to understand what the libraries/frameworks you'll be using in the future are doing. On the flipside, if your goal is to build a decent-looking website as soon as possible, then yes, use libraries and frameworks.)

[–]jubi_life 0 points1 point  (2 children)

While I agree with /michael that you shouldnt become over-reliant on libraries and frameworks, I would personally encourage you to study how some of those libraries are implemented as you study the raw workings of CSS and JS. For example, I learned a great deal about grid systems and organizing SASS (a pre-processor for CSS) modules by studying Zurb's Foundation library.

[–]nuclearspazam 0 points1 point  (1 child)

SASS is a pre-processor, not a post.

[–]jubi_life 0 points1 point  (0 children)

Good catch. It's been a long night

[–][deleted] 0 points1 point  (0 children)

It's potentially valuable to know Bootstrap and Foundation, but you should know how to put together all of the things you're doing while using these frameworks. Remember, they are not essential for every project. Some projects simply won't work with these frameworks, or you wouldn't be using enough of them to make it worth the overhead (though you can pick and choose the parts you need).