Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Understanding fluid offsetting

From: Up and Running with Bootstrap 2

Video: Understanding fluid offsetting

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.

Understanding fluid offsetting

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.

Show transcript

This video is part of

Image for Up and Running with Bootstrap 2
Up and Running with Bootstrap 2

32 video lessons · 19988 viewers

Jen Kramer
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Up and Running with Bootstrap 2.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

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.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.