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

Up and Running with Bootstrap 2

Including lists


From:

Up and Running with Bootstrap 2

with Jen Kramer

Video: Including lists

Down here at the bottom of the page where it talks about Exhibit Halls A & B, we have a couple of lists--actually we have one list. Right now, it's a single bulleted list that talks about smart displays that will be occurring in Exhibit Halls A & B throughout the week. And then under that we have a sentence that says to visit three local photographers who will be displaying their works, and it says something like Sam Gilmore: Ocean photography. Currently, those are marked up as individual paragraphs, and that is actually rather incorrect markup. It's still a list of things, Sam Gilmore is the photographer, Ocean photography is his topic.

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...
Up and Running with Bootstrap 2
2h 38m Beginner Oct 12, 2012

Viewers: in countries Watching now:

Bootstrap is a free web development tool from Twitter that, with a little bit of CSS and JavaScript experience, makes building websites quick, intuitive, and fun. Author Jen Kramer explores its 12-column grid layout; typography and icon libraries; fully functional components like nav bars, buttons, and tabs; and much more. This course also shows how to add JavaScript extras like dropdown menus, modal windows, and photo carousels.

Topics include:
  • Understanding the difference between default and fluid grids
  • Nesting with fluid grids
  • Creating a thumbnail gallery
  • Adding block quotes and lists of text
  • Incorporating images and icons
  • Adding breadcrumb navigation and pagination
  • Using tabs and pills navigation
  • Making the nav bar responsive with JavaScript
  • Adding dropdown menus to the nav bar, tabs, and pill
Subjects:
Web CMS Blogs Responsive Design Web Design
Software:
Bootstrap
Author:
Jen Kramer

Including lists

Down here at the bottom of the page where it talks about Exhibit Halls A & B, we have a couple of lists--actually we have one list. Right now, it's a single bulleted list that talks about smart displays that will be occurring in Exhibit Halls A & B throughout the week. And then under that we have a sentence that says to visit three local photographers who will be displaying their works, and it says something like Sam Gilmore: Ocean photography. Currently, those are marked up as individual paragraphs, and that is actually rather incorrect markup. It's still a list of things, Sam Gilmore is the photographer, Ocean photography is his topic.

They go together, but they're not individual list items the way Area high school students or Roux Academy students or Conference participants are. The best way to mark up that particular laundry list of stuff down there at the bottom is really a definition list. A definition list is something that is not typically used a whole lot inside of web pages at this point in time, but it's incredibly useful. It's got a two-part list, so there's a definition term and a definition itself, so things can be paired together inside of a list.

So I'd like to have marked that particular group of items up correctly, and let's take a look at some styling that Bootstrap offers for dealing with lists. So inside of Dreamweaver, if you scroll on down to you the bottom of the page. I'm at line 62. First of all, let's take a look at that bulleted list. As you saw, those are displayed right now with individual bullets, if I wished. I don't have to display the bullets at all by taking this ul and adding a class of unstyled, and by adding that class of unstyled that will get rid of the bullets in the list.

So now if I refresh my web page, you see there is my list here under Exhibit Halls A & B, and the bullets on that list no longer exist. Now I don't think that works at all. I liked it much better as a bulleted list. I thought it was much easier to read that way; however, I wanted to be sure to tell you about unstyled, which is a class that you can use on both ordered lists, the ol tag and unordered lists, which is the ul tag. You, of course, could then layer other styling on top of your list once you've turned the bullets off via the unstyled tag.

Also note that it's gotten rid of the margin or the padding that goes around that list as well. So that's a pretty handy style to know about. I'm not going to use it on this page, but now you know that it exists. Okay, so back to Dreamweaver here. I'm going to take that class of unstyled out again. And then down here at the bottom is that group of photographers and their specialties. So let's go ahead and mark this up correctly. So any time you see something like this, you want to make use of a definition list, you always knew to start with the dl tag, which stands for Definition List.

And then down underneath the end of that, we're going to wrap that, so of course that /dl is required. Then we're going to have our first one here, Sam Gilmore. We'll change this paragraph tag to a dt, which stands for Definition Term. And Ocean photography we'll change to a dd which is the actual definition. And although we're not thinking of these as dictionary terms with definitions, these are again related pieces of content that are tied together, and by using dt and dd we are showing the association between those two items.

So we are going to ahead and change this markup here really quickly. Okay, so now I've got this all marked up as a definition list. So if I save this again, File > Save, and I put it into Firefox, you'll notice that we have a very nice style here, where we have the Sam Gilmore presented as a bold name and then underneath of it Ocean photography is slightly indented. So it's pretty clear that Ocean photography goes with Sam Gilmore, for example. So that's a very nice looking list.

There is another style that Bootstrap offers that you may want to make use of here as well. So if you go back to Dreamweaver, add here for the dl, simply add the class of dl-horizontal. And what that will do, as you might predict, will put the name over on the left and the occupation or interest over on the right. So if you save this page and put it into Firefox, Refresh, you'll see down here at the bottom of the page now that we have a list of photographers, they're still bold in with their interests over on the right side, which is also a very, very nice presentation.

So Bootstrap has a few treatments for lists. These are lists that are just your basic list, content list that I've showed here on the web page. There are additional options that are available for navigation, which is often marked up as a list. I'll be covering those in the next chapter on navigation.

Find answers to the most frequently asked questions about Up and Running with Bootstrap 2.


Expand all | Collapse all
Please wait...
Q: I am trying to create the image carousels shown in this course, and they are not functioning properly. The custom.css file seems to be missing from the exercise files and I think this is the reason. Can you provide it?
A: custom.css isn't created until the carousel indicators are added. However, these styles have to do with the way the indicators look, and nothinghas to do with the way the carousel functions.
 
Are you sure you're working with Bootstrap 2.x? You download that from here: 
http://getbootstrap.com/2.3.2/. The carousel changed radically between Bootstrap 2.x and Bootstrap 3, and this course might not work with version 3.
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 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 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