Start learning with our library of video tutorials taught by experts. Get started

Bootstrap 3: New Features and Migration
Watching:

Using list groups


From:

Bootstrap 3: New Features and Migration

with Ray Villalobos

Video: Using list groups

Those groups are a new type of component that lets you create mobile-like lists with a lot of different options. You see the markup is pretty simple. You can create a list by using an unordered list, the class of list-group, and then a list item with list-group-item classes. And you can add chevrons pretty easily, as well as badges, to the right, and also make these into clickable components by making them into anchor tags. So let's take a look how that works. So starting off with the file from the movie Working With Panels. And the first thing we're going to do is just create a list, so we'll go ahead and remove this content right here and I'm going to give plenty of spacing. And I'll create a list, list will have a class of list group. And we're, we'll go ahead and add some list items and the list items will have a class of list-group-item.

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
Bootstrap 3: New Features and Migration
46m 57s Intermediate Aug 08, 2013

Viewers: in countries Watching now:

Bootstrap 3 is here, and it supports mobile design and responsive CSS better than ever. Join author Ray Villalobos for an overview of the new classes, mobile-first approach, and other enhancements in Bootstrap 3, and learn how to migrate your sites and files to the new framework. Find out about the new installation options, updates to grids and scaffolding, and changes to the handling of type, images, and JavaScript. Then learn to integrate the new list group and panel components into your workflow. The course closes with a look at migrating a sample site from Bootstrap 2.3 to 3.0, from replacing template files to tweaking your grid, navigation, and images.

Topics include:
  • Installing Bootstrap 3
  • Using the new grid systems
  • Working with typography
  • Understanding the responsive class updates
  • Using panels and list groups
  • Migrating from Bootstrap 2.3 to Bootstrap 3.0
Subjects:
Web Responsive Design Web Design Web Development
Software:
Bootstrap
Author:
Ray Villalobos

Using list groups

Those groups are a new type of component that lets you create mobile-like lists with a lot of different options. You see the markup is pretty simple. You can create a list by using an unordered list, the class of list-group, and then a list item with list-group-item classes. And you can add chevrons pretty easily, as well as badges, to the right, and also make these into clickable components by making them into anchor tags. So let's take a look how that works. So starting off with the file from the movie Working With Panels. And the first thing we're going to do is just create a list, so we'll go ahead and remove this content right here and I'm going to give plenty of spacing. And I'll create a list, list will have a class of list group. And we're, we'll go ahead and add some list items and the list items will have a class of list-group-item.

Go in and make about five of those. Alright, so inside each one of these I'm going to type in just some text. So I'll just do first and so on and so forth. And I'll save that, and I'll refresh this page. Looks like I missed a hyphen here, so let me go ahead and fix that. I'll just add a hyphen, and refresh the page, and it should look like this. It just looks like a series of mobile device list elements. That's pretty cool. Notice that there's a little bit of padding around the list, and if you want that that's cool.

You can also add another class that is unordered list to make those flush, so I'll add a list-group-flush class there. And you can see that everything kind of goes up to the edge. So either way, whichever way you want to style them, that's great. Now let's go ahead and add some chevrons and then maybe some badges. They're pretty easy to do and it actually doesn't matter where you put them, so If I can do a span, with a class of glyphicon, and then I add another class of glyphicon, and then chevron-right, and I save that.

I get a chevron right here to the right hand side, which is pretty cool. I can also add a badge pretty easily, I'll just create a span with a class of badge, and then I can put a number in here, so I'll put the number ten and save that, and refresh. You can see the badge appears. Notice that the order does matter a little bit. I want to do the chevrons first and then the badge next, but it doesn't matter that I have the content before or after. It's just placing these where they need to go on the right-hand side. So that's actually pretty cool. Now if I want to get more complicated with my content, I can also define some sort of heading.

So I'll do an h4 with a class of list-group-item-heading, and let me put this content here inside. So I'll paste that, and then I'm just going to put some text here. So I'll put some long text and I'll save this and you can see that it aligned pretty well. I really do want to put in another class inside my text called list-group-item-text, and I know this is getting a little bit wordy but it really pays off to use these classes. It knows how to align things properly if you use them. So you can also make these into clickable elements by adding some anchor tags. And as a matter of fact, what I'm going to do is, I'll take the on order list here and change it to a div, and I'm going to take my list items and change them to anchor tags.

So I'm going to select this one, and I'm using sublime text here so you can do Cmd+D, Cmd+D, Cmd+D to get all the other ones. And then hit the right arrow and make a selection, and I'll change that to an anchor tag right here. Now because this is an anchor tag, I need to do an href, of, I'll just do #, because we don't really need to, link them to anywhere, we just need to show how they work. And then I need to find all the closing list items. This one's right here; select that one, Cmd+D a few times and then hit the right arrow. I have multiple cursors, and I can close all my anchor tags at the same time.

Save, and refresh, and now, you can see that these actually highlight. It's showing me the little hand icon, and these are actually clickable, and it made sure that it styled everything correctly when I did that, which is pretty awesome. You can also add a class of active to any element that you want to highlight as being an active link, and that's pretty cool. These additions to Bootstrap are very mobile-focused, but they give you a lot of power without having to do a lot of CSS. So I really like this addition to the Bootstrap framework.

There are currently no FAQs about Bootstrap 3: New Features and Migration.

Share a link to this course
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.
Upgrade now


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.

Upgrade now

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 Bootstrap 3: New Features and Migration.

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 preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



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.

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