Advantage of using a CSS framework
Asked Answered
P

6

9

I have been thinking of using a CSS framewrok as many web designers use it. They say that it is good, etc. But is there any real advantage of using a CSS framework like 960 Grid System or Blueprint? Will it make my life easier? Do these frameworks consider the devilish Internet Explorer?

Any insights will be helpful.

Pepper answered 26/6, 2009 at 7:33 Comment(3)
dupe: #203569, #507023Casease
Neither of these duplicates appear in the suggestions list for this question. Instead, there are dozens of questions which contain the string "CS."Phebe
Also, searching for "CSS framework" results in tens of relevant suggestions.Phebe
D
11

Many frameworks include Reset-Rules, which is a single stylesheet (Generally Meyers' or a derivation of it) that balances out the rendering of elements across multiple browsers. Now, if you decide to use a CSS Framework or not, you SHOULD use a Reset.

I've only really used 960, and I must say that I enjoy it. The cool thing is that your layout is laid out with classNames that contain numerical-values, meaning you could programmatically determine a new layout if you like - simple math. It also makes developing a complicated layout much faster in many cases. Nettuts did a video of 960 some time back called "A Detailed Look at the 960 CSS Framework."

Do you NEED a framework? No. Do they help? In many cases. At the very least, I would encourage you to download 960 and play with it, and from now on start using at least a Reset.

Example of 960 Markup and Class Names:

<div class="container_12">
    <div class="grid_7 prefix_1">
        <div class="grid_2 alpha">
            ...
        </div>
        <div class="grid_3">
            ...
        </div>
        <div class="grid_2 omega">
            ...
        </div>
    </div>
    <div class="grid_3 suffix_1">
        ...
    </div>
</div>
Directoire answered 26/6, 2009 at 17:35 Comment(0)
D
4

It's a good idea not to confuse the concept of a framework with a type or instance of a particular framework. Some argue that because a framework (like 960 for example) doesn't suit a certain use case, you should avoid frameworks altogether. Crazy!

A framework is a tool that good developers use to get a job done. A skilled developer might even build their own framework for their own consumption. Abstraction is a powerful concept that every developer should master.

It's interesting to take a moment to consider a good definition of a framework: "An abstraction in which software providing generic functionality can be selectively changed by user code". It could perhaps be argued that CSS is in fact, a framework extending HTML.

I have played around with 960 and I recommend giving it a go but these days, I tend to make my own set of rules (a framework) using something like sass. There is a port of 960 and blueprint into sass, I think.

I recently worked on a large enterprise website and one of the first things I did was abstracted out the hex values from the CSS into a color palette so there was less redundancy in the CSS files. A month or so later the client asked us to rebrand the site for a different market which meant changing a few sprites and updating the color palette and the job was done. It took just a few minutes!

But to answer at least part of your question: Yes! There are advantages to using a framework. I would even go as far to say that avoiding them is a little naive.

PS: sorry if my answer is not specific but you did mention any insights would be helpful :)

Dunagan answered 22/9, 2011 at 11:57 Comment(0)
A
3

It depends. If you are learning CSS or the project doesn't require a lot of styling, I think you shouldn't use a CSS framework. Also, if you want to create a very unique or specific styling, it won't help you a lot.

However, if you are experienced with CSS and the project is large, a CSS framework may help you to save time and problems.

And yes, they consider IE.

Academe answered 26/6, 2009 at 17:26 Comment(0)
P
3

I agree with what's been said so far. Those frameworks do speed things up. Yes, it is important to really know what's going on behind the scenes, but to answer your question, what are advantages of using a CSS framework. Here's my take on that:

By using a framewok you don't need to be a CSS expert to implement any design. This has been especially useful for me when I need someone else to implement a design, and an expert is not available.

Penicillin answered 21/11, 2011 at 17:27 Comment(0)
N
2

CSS frameworks can really help save time laying out your page with just a set of predefined classes. I think they are great and can really decrease the time you spend converting a design to html/css. I would recommend taking a look at a few that I use on a regular basis.

heymuscle

960gs

1140 grid

hope this helps.

Neoplasm answered 24/9, 2011 at 17:28 Comment(0)
A
0

Once you get used to them, CSS frameworks can seriously speed up the creation of crossbrowser websites.

IE support varies from framework to framework. Some support only IE8 and up. Others support old IE up to IE6.

I released my own CSS framework "Cascade Framework" a couple of months ago.

Atbara answered 19/6, 2013 at 16:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.