Viewers: in countries Watching now:
Have you wondered if using a CSS framework will speed up your site development? In this course, senior author James Williamson introduces the types of frameworks available—including the most popular choices among working web developers—and provides an honest assessment of the pros and cons to using a framework. He guides you through downloading a framework, setting up a directory structure, and building a framework-based site, such as structuring the HTML and working with forms. A separate chapter explores layout grids, often included with CSS frameworks, which provide a simple system for laying out page content.
Understanding the different types of frameworks is a little easier to do if you dive into them and see what makes them tick. I'm going to start by exploring a minimal framework and seeing what it has to offer. And to do that, I'm going to show off Skeleton, which is one of my favorite minimal frameworks. You can find it at getskeleton.com. So the first thing I want to take a look at is what is the focus of Skeleton, what's it all about? And if I scroll down on my Homepage here, they basically have three core principles that they talk about, a Responsive grid that responds all the way Down to Mobile.
So it's a layout that's going to change as screen size changes. Quick to Start, so it's a tool that's meant to help speed up development and deployment of your site. So it talks about making sure that the CSS is written with best practices, it's got a well-structured grid, light styling for some of the more basic user interface elements, and things like that. The main point is this last one that is Style Agnostic. So unlike some of the other UI frameworks that sort of force you into specific themes, it's really more of a kit. It describes it as being a development kit, for example, that provides the most basic styles, just as the Foundation and then as a designer are free to override those.
If you want to spend some time on this site, go through all the different sections and read a little bit more about the framework and find out about it. If you just want to see what's included with Skeleton, go ahead and download it. You can do that. I'm going to just click on the little Download link over here on the right-hand side, or you can just scroll down to the Downloads section, and you'll notice that there are two options for downloading. One is to download the framework from GitHub, and the other is to download a PSD template, so it's a Photoshop template that can help you plan your pages based off of the grid that Skeleton has inside of it. It also gives you some list of the contents, what is actually involved in downloading this.
You're going to have a sample HTML page, sort of the base page to start from. You're going to have three different stylesheets: base, skeleton, and layout. The Base of course is the majority of the basic styling of Skeleton. Skeleton is the actual grid itself. And then layout.css is just a collection of media queries that you can then sort of start putting your own styles into. You also have an images folder, and that's going to have the favicon, as well as an apple-touch-icon, and that's both going to allow you to sort of jumpstart creating your sites, because those are just kind of template icons that you can then replace with your own graphics.
I went ahead and downloaded Skeleton, unpacked it, and I'm going to look at the framework here in Dreamweaver just so you can get a feel for what types of things that an average minimal framework will handle for you. So I have the index page opened right now, and I just want to go over this code really just briefly just to see how it's structured and set up. You'll notice the head is very minimal. As a matter of fact, we just have some conditional comments for Internet Explorer that pass along an alternate HTML opening tag for IE, and then you're free to go ahead and throw in whatever you want.
The code is really well commented and well sectioned, so you start off with your Basic Page Needs, some meta character, description, page titles, and things like that. We have a meta viewport tag that sets the viewport on mobile devices, and then we have the links to the external stylesheets, the base, skeleton, and layout. Of course, you're free to modify those and combine them anyway that you want. And then we have another conditional comment for less than IE 9, that's going to apply the HTML5Shiv, because this page is based off of HTML5. Then we have some links to Favicon.
And once again, you're free to go ahead and change this up anyway that you want. Now within the actual body itself, there's a sample page. As a matter of fact, if I preview this in my browser, you can see that it's really just sort of placeholder content that explains what Skeleton is and what the principles of it are, that sort of thing. But you're free to take this code to strip it out and replace it with your own code. Now if I go into the actual CSS itself, if I go into the base.css, you'll notice something about the CSS as well. This is not minified, so you might want to compress this down for deployment, but it's got a nice Table of Contents in here.
It shows you how the styles are organized, you get your Reset & Basic Styles, you get little bit of Typography, you're styling some Links, Lists, Buttons, Images. Now if you're thinking yourself, wow, this really seems very comprehensive. It's really not. All these styles have a very minimal footprint to them. As a matter of fact, all these elements--if I scroll down through the styles--you'll notice there is really only about 270, 260 lines of code, and that's with this being not minimized or compressed in anyway. So the code is still very, very lightweight, and it's just essentially offering some very basic neutral styling for all those elements and getting them to be cross-browser compliant, and then you're free to style right on top of those.
The skeleton.css takes care of the layout and the grids, and of course, we're going to talk more about them as we go into talking about grid systems. And then the layout.css file, this is really your file to go in and modify anyway that you want. You'll notice that there are a few media queries that you can use to target specific devices or screen sizes, sample font-face declaration if you want to do that, you're You're not totally sure how that syntax works, they have some sample syntax in there for you that you can copy and paste. But really, this file just serves as a placeholder for your own styles.
If you want to choose to work that way, you could just take this file and run with it, or you could modify the existing CSS files. Given the fact that we have three CSS files here, an images folder, an HTML file, I'm guessing that a couple of you guys are probably saying, wait a second, that's not really that minimal, is it? Now, I admit there is a good bit going on here, but for the most part, all Skeleton really attempts to do is establish styles that are written with best practices, it provides you with a very simple solid layout grid, and it provides a set of easily customizable default styles that you can then modify and extend for your own site.
It's not forcing you into any one sort of theme, if you will. The styling is very neutral, extremely easy to customize, and that way Skeleton is one of the most unobtrusive and minimal frameworks available.
There are currently no FAQs about CSS: Frameworks and Grids.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.