Viewers: in countries Watching now:
So, here we go. And what we have here is the main article, which is this thing called Services. And we have a nice little picture to go with that. On the left side of the page we have a little bit of text here. Sort of a supplementary kind a thing, a highlight of the dental services that Wisdom Pet Medicine offers. And so, what I'd like to do though is I'd like to get a little bit more space between these columns. So you'll see here that we have a bit of space here between the two columns. But what I'd really like to have happen is have just a little bit more breathing room between those. So of course one possible solution is go to mess with grid system and try to establish more space here.
But that can have all kinds of unintended consequences for other pages. I mean it's the grid system that you'd be messing with. What is a, probably a better approach is what if I take one of my extra columns and have it as part of the grid here. But, what it's going to do is just display nothing. So in other words, if I have my left column at three columns wide. And my main content over here at let's say eight columns wide. That's a total of 11. Then I want one additional column in between the two that's just plain old white space and that will still add up to 12.
So that's what offsetting is all about. So if we take a look here inside of Sublime Text. And I'm going to scroll on down here to row number two. Which is around line 24. So here is the markup for this particular page. You'll see on 926. This is an aside. Aside is an HTML5 tag that is designed for just this very kind of text. It's not necessarily absolutely critical to the page. If it was cut off, you could still understand the content of the services page. But it is something of an aside, it's not the main focus of the page.
So that's what the purpose of the aside tag is and that's why I've chose to use it here. And then next to that we have an article and of course this is the main meat and potatoes of this particular website. And so the article is the tag that I'm using for that other side of the page. Just to, using a little bit more the semantic markup from HTML5. And as you'll see here, I'm using my small and my large grid on this page, so I have a large grid of three here. When the page is very wide and small grid of 4, and then on the article the large grid of nine because 3 plus 9 is 12.
And 8 here on the small group, so 4 plus 8 is 12. So, you want to make sure that your numbers are adding up in the large column. Your numbers are adding up for the small column, and so far everything is great. What I'd like to do now, is I'd like to take that extra column somewhere and establish that bit of white space. So, what I'm going to do to make that happen is, i'm going to back off these numbers. So, instead of nine, I'm going to make it eight. And instead of eight, I'm going to make it seven. And then I'm going to add two more classes. So what I'll say here, is, after the column large eight.
I will say, col-lg-offset-1. So, in other words. We're going to make this article eight columns wide and we're going to have an offset of one. I put it here on the article, because the offset's always added to the left side. So, if we edit the offset here to our aside, it would be added to the left of the aside. In other words, the aside would be pushed over one column on the page. And we actually wouldn't get any extra space between the aside and the article.
So this is now offset one column here on the left of the article. So we should get that space in between the two. And then we're going to have to do the same thing for the small grid. We're going to have to add its offset as well. So this is going to be call-sm-offset-1. So, if you were using three or four kinds of grids here, you'd have to add the offset for each one of those. Or, of course, you don't have to use the offset for each grid. You could decide that, for some other resolutions, maybe you don't want an offset at all.
But for the ones that you do want an offset, you're going to have to specify it here. Okay, so we go ahead and save this page, File > Save and if you show this in your browser. I'm just going to refresh what I have here, you'll see that services is moving over to the right. And, as I make this page smaller. You'll see that, that space is maintained as I hit various breakpoints along the way. Right up until each of these blocks of text goes vertically on down the page. Now, one of the things you might notice at this point is that, of course with the left column by default, what you have is this text at the top of the page.
About keeping your pet's chompers clean and healthy and services is buried underneath. You might want to try reordering that and I'm going to show you how to do that in the next video.
Find answers to the most frequently asked questions about Up and Running with Bootstrap 3 .
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.