Viewers: in countries Watching now:
So here's the web page that we built in the previous video. What I really wanted to have happen is I wanted to have a left column of this page, and I wanted to have a few articles listed on the right side of the page. Although this third row looks like I have an article on the left side of the page and more information about it over on the right, it would obviously look a lot better if I had the articles all lined up one after the other. But for the second article, I don't really want anything to appear over in the left-hand column. So what can I do? In Bootstrap, this is called offsetting, and it's very easy to set up.
So I can set this up such that I can have the two articles appear underneath of each other and not have a left column in the second row. Remember that every row has to add up to 12. There has to be 12 columns, no matter what you do. So offsetting is a way of allowing you to have those 12 columns represented, even if they're not all containing content. So, I'm going to go back to Dreamweaver here at the bottom of my screen, and I am going to make a couple of quick changes to this page.
So just to make my articles stand out a little bit more here in the second row, I am on line 25, I'm going to add an h2, and I'm going to call this Article title, and then down here in the second row, I'm going to get rid of this aside with class of span3 on lines 35 through 37. I'm just going to make that go away. I really don't want it. And I'm going to clean up the markup here in this particular article a little bit as well, so it has an heading, another article, and of course, underneath that would be a paragraph with whatever text happens to be contained in that article.
So, now what I need to do is inside of this third row that you see here, we have a span9, but we don't have the other three columns accounted for just yet. So, the way to do this is to use the offset. So, I'm going to say span9 offset3, all one word. These offset classes, again, range from 1 to 12, and what they'll do is they'll add blank columns on the left side of your particular row. So, with an offset of 3, it's going to add 3 columns on the left side of the screen that will be blank followed by the article, which will occupy there 9 columns on the right side.
So I am going to go ahead and save this page, File > Save, and I put this into Firefox. Now you can see that I have a left column on this web page, and I have the two articles that are appearing underneath. So all those line up a whole lot better on the page, or it looks a whole bunch better than it did before. I may also want to do something with this copyright. Right now the copyright is located down in the bottom of this web page. It's got a span of 12 on it, so it goes all the way across the bottom. Perhaps what I really want to do is shorten that up and have it appear just on the right side of the page.
I can do that also with offsets. So I go back to Dreamweaver. Down here on the bottom rather than a class of span12, what if I did a class of Span2, and I did an offset of 10 and then down here on the bottom, I could put in a copyright symbol under Insert > HTML > Special > Characters > Copyright, and then I could put in some actual text here, 2012 lynda.com? Go ahead and save that. So File > Save.
And now when I go back to my Firefox, and I Refresh my web page, you'll see that I've got the copyright statement is now appearing over towards the right side of the screen, exactly the way that I want it to. So in this particular video, we have taken a look at the offset property inside of the grid. This allows you to have a row with all 12 columns accounted for even if not all 12 of those columns are going to contain some kind of content.
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.