Start learning with our library of video tutorials taught by experts. Get started
Viewed by members. in countries. members currently watching.
Bootstrap ships with a 12-column grid system that comes in two varieties. I am on the Bootstrap website at getbootstrap.com, and if you click on the Scaffolding tab here on the top of the page, and you click on the link on the left side for the grid system, you'll see the Bootstrap's default grid system. As shown here, this is the default 940 wide grid. It's designed to adapt somewhat via adaptive layout to different screen widths. The numbers indicate how many columns wide each box is.
In the first row, there is only one column per box, the next row is grouped into a few columns. If you roll your mouse over each box here in the documentation, there is a tooltip that will come up to tell you how wide each box is. That tooltip only works in the documentation, it's not going to work on your live site. Now you might be wondering, I just told you this is a 12-column grid, but yet when you look at this example here on the Bootstrap website, you'll see that it's only 9 columns, why is that? Well, the whole entire getbootstrap.com site is built in Bootstrap itself.
The left column on this particular website is three columns wide, leaving nine columns left over for the main content area. In this example, for how the grid HTML works, it says that each row should comprise as many columns as its parent. So in this particular case, since the parent is nine columns wide, the grid example is also nine columns wide. Now if you click on the link here for the Fluid grid system--we'll jump down the page to that particular example--the fluid grid system is a true responsive grid.
Note that it is 12 columns wide, even though this grid is embedded inside of the grid used to layout the web page. This responsive system is somewhat different. Since it's built with the columns of a percentage width instead of a fixed pixel width, you need to keep all of the grids to 12 columns, or 100%, no matter where they occur on your page. So this is an embedded grid of 12 columns wide, even though it's inside of a larger area that's 9 columns wide. Now I just used two terms to describe these grids, an adaptive layout, which is for the default grid system, and responsive design, which I'm applying to the Fluid grid system.
Responsive design was defined by Ethan Marcotte in an article published at alistapart.com back in 2010. Marcotte said that responsive design contains three aspects: fluid grids, flexible images, and media queries. A fluid grid is one that's built using a relative unit of measure like ems or percent instead of pixels. Flexible image means that the images resize as part of the design, they generally display larger on a big-screen, and they scale down as the size reduces.
Media queries are also included in the CSS3 standard, and they allow you to define different styles for different screen widths. Adaptive layout is something of a precursor to responsive design described on the alistapart.com website in 2006, by Marc den Dobbelsteen. This uses a fixed width grid instead. In the particular implementation we're looking at, the layout of the screen resizes once specific pixel widths are reached. This design may not fill the entire screen at all times the way a fully-responsive layout does.
Many people, including Jeffrey Zeldman, argue for a broader definition of responsive design, one that will encompass adaptive design and adaptive layouts. However, as of this recording, these two approaches are viewed as separate. Bootstrap's default grid is the adaptive layout, while Bootstrap's fluid grid lets you make a truly responsive website. So which grid is best? Well, as always, it depends on what your goals are for this website. In general, many designers are leaning in the truly responsive direction using percentage-based layouts for their sites and images that resize.
However, if you're not comfortable with that approach, you can certainly use the default grid and its adaptive layout. I will be working with the Fluid grid in this course, as I feel that the advantage of working with Bootstrap is the ability to make responsive websites quickly and easily. So we're going to take a look at the Fluid grid system in a bit more detail in the next video.
Find answers to the most frequently asked questions about Up and Running with Bootstrap 2.
Here are the FAQs that matched your search "":
Sorry, there are no matches for your search ""—to search again, type in another word or phrase and click search.
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.