Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now

Styling tabular data


From:

Up and Running with Bootstrap 3

with Jen Kramer

Video: Styling tabular data

I'm looking at file 03_07.html. It's in your Exercise Files folder. Go ahead and copy it to your Bootstrap folder. Open it up in your web browser here. This is basically the page that we just finished styling with the thumbnails over here on the left side of the page. On the right side of the page is some contact information that's actually displayed inside of a table. And what I'd like to do now is concentrate on styling that text over there on the right side of the page. So if you come on down here, I'm inside of sublime text 2 and I'm looking 03_07.
Expand all | Collapse all
  1. 5m 25s
    1. Welcome
      58s
    2. Using the exercise files
      1m 19s
    3. Installing Sublime Text 2
      3m 8s
  2. 29m 0s
    1. What is Bootstrap?
      8m 1s
    2. Downloading and unzipping Bootstrap 3
      4m 31s
    3. Examining Bootstrap file structure
      4m 34s
    4. Adding CSS to a Bootstrap HTML file
      4m 35s
    5. Adding JavaScript to a Bootstrap HTML file
      7m 19s
  3. 43m 46s
    1. Exploring Bootstrap's grid system
      9m 10s
    2. Creating new rows and cells
      13m 17s
    3. Adjusting column widths using offset
      5m 2s
    4. Changing column order using push and pull
      5m 33s
    5. Nesting columns
      3m 42s
    6. Creating a JumboTron-style layout
      3m 40s
    7. Challenge: Working with grids
      1m 30s
    8. Solution: Working with grids
      1m 52s
  4. 53m 33s
    1. Exploring basic typography: The small and blockquote tags
      4m 28s
    2. Exploring Bootstrap's responsive classes including .hidden and .visible
      4m 44s
    3. Styling buttons using btn classes
      4m 43s
    4. Styling images with responsiveness and decorative touches
      5m 22s
    5. Incorporating Bootstrap 3 glyph icons
      3m 28s
    6. Creating a thumbnail gallery
      6m 2s
    7. Styling tabular data
      5m 3s
    8. Overriding core CSS with custom styles
      12m 53s
    9. Challenge: Styling panels and callouts
      2m 17s
    10. Solution: Styling panels and callouts
      4m 33s
  5. 27m 40s
    1. Implementing location breadcrumbs
      6m 37s
    2. Using tabs and pills for navigation
      6m 58s
    3. Developing a responsive navigation bar
      9m 9s
    4. Challenge: Modify the "pancake" button
      1m 3s
    5. Solution: Modify the "pancake" button
      3m 53s
  6. 37m 45s
    1. Implementing dropdowns within a navigation bar
      5m 5s
    2. Tabbing within the same page
      15m 45s
    3. Accordion panels with collapse functionality
      11m 37s
    4. Challenge: Tooltips
      1m 59s
    5. Solution: Tooltips
      3m 19s
  7. 3m 0s
    1. Next steps towards advanced Bootstrap
      3m 0s

please wait ...
Watch the Online Video Course Up and Running with Bootstrap 3
3h 21m Beginner Oct 07, 2013

Viewers: in countries Watching now:

Meet Bootstrap, the one-stop shop for designing sleek, mobile-ready websites with HTML5, CSS3, and JavaScript. It's an open-source, responsive design framework, featuring a grid-based layout system, web-ready icons you can incorporate into your designs, fully functional navigation, and much more. Join Jen Kramer for a quick overview of all of the goodies in Bootstrap, and then learn how to customize the grid, override the CSS to customize your site, and leverage Bootstrap's stylish built-in JavaScript effects. Once you're prepared to test your knowledge, you can take the hands-on challenges offered by Jen.

Topics include:
  • Downloading and installing Bootstrap
  • Understanding the Bootstrap file structure
  • Exploring the 12-column grid
  • Changing column width and order
  • Styling buttons, images, and tables
  • Overriding core CSS
  • Creating a thumbnail gallery
  • Adding JavaScript effects, like dropdown menus, tabs, accordions, and more
Subject:
Web
Software:
Bootstrap
Author:
Jen Kramer

Styling tabular data

I'm looking at file 03_07.html. It's in your Exercise Files folder. Go ahead and copy it to your Bootstrap folder. Open it up in your web browser here. This is basically the page that we just finished styling with the thumbnails over here on the left side of the page. On the right side of the page is some contact information that's actually displayed inside of a table. And what I'd like to do now is concentrate on styling that text over there on the right side of the page. So if you come on down here, I'm inside of sublime text 2 and I'm looking 03_07.

And I'm down around line number 60, this is where the table starts. And you'll see here this is just a table that's marked up with tabular data. It's a chart of doctor names, phones, phone numbers and email addresses. So here they are all the rows, all the cells and so forth. So it's fine the way it is, but I'd really like to make it look a little bit prettier. And there are wonderful ways you can do that in Bootstrap. It's the easiest thing in the world, I'm telling you. All you need to do is here on line 60, inside of the tag called Table.

All you need to do is add a class of table. So table with a class of table here on line 60. Save it and refresh your webpage, and boom, you have a styled table. That's all it took. Isn't that a beautiful thing? I think that's just awesome. But there are some other things that you can add to this, because, you know, if one class is good two must be better, right? So this is your basic table layout here. Because of the way that I've marked this up using th's for our cell headings and td's, technically table data.

We have here these bolds on the top with this darker border followed by the rest of the information here in our table. That's where that styling is coming from but there's some additional things that we can do here inside of this table tag we can add, for example, table-striped. If you save that, and hit refresh here in your web browser, that will fill in a very light color behind these. So it makes it reading across a little bit easier. Particularly if you have a really wide table. That can really enhance the legibility of that particular table.

Back here again, we're still on line 60. Instead of table-striped, you can say table-bordered, and this is going to give you that spreadsheet look. So if you refresh your page here, there we go. Now we have borders on all four sides in our cells. Which might be appropriate, depending on what kind of table you're using. I don't think that's as pretty as some of the other ones. But if you're doing scientific data or something, that might be very important. Table-hover, gives you a lovely hovered effect. So, if you once again, refresh your page here. And now if I hover over these rows, I'm going to get that nice shading behind each of the rows.

So, that's quite lovely. Table-condensed, will give me a bit less padding in my table. So, right now if you take a look at that, that's the way it has been looking when I refresh the page. Here the padding around all the cells has been reduced. So, if you need to get a lot of information on a page that might be something good that you'd like to do. The last thing you might be wondering about is your table and how responsive it is. So as I make my page smaller and narrower, you'll see here that we've got this table that's in place. The page stacks because of the grid system, but then we start to get the page narrower and narrower here.

And at some point, these email addresses are just too long. We wind up with a scroll bar at the bottom of the page. And that's because tables are not responsive out of the box. So, something that you might wish to add is a class of table responsives. To do that, you're going to need to wrap that in a div around the table. So, just above the table, we are going to add a div with a class of table-responsive, and then just after the /table tag we will add a /div. Once you have that div in place, if you go ahead and save your page, and you refresh which you've got on screen, you'll see that, as you make your page narrower.

Once again, you'll notice this scroll bar shows up here down at the bottom of the table. And that will of course become an active scroll bar, when the page is down to a small enough dimension that side-to-side scrolling is required. So that scroll bar now is localized to this table and the data in the table remains quite legible thanks to that div with the class of responsive wrapped around that table. Okay, so can you combine these classes? Absolutely. I'm going to leave this div with a class of table responsive wrapped around the whole thing.

The table with the class of table and table condensed, we can also add one of the other classes. Say, table-striped. So we can have a table that's condensed and striped which is also responsive, for example. And if you save that and refresh your page in your browser, there we go. We have our striping in place, it's still the condensed format and it's still a responsive format. So it's possible to combine these classes as well. So if you have tabular data that you need to display in your Bootstrap site, nothing could possibly be easier styling-wise.

Then these great classes that come with Bootstrap this just makes styling tables such a breeze.

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


Expand all | Collapse all
please wait ...
Q: I don't see the respond.min.js file at the URL mentioned in the Chapter 1 movie "Adding JavaScript to a Bootstrap HTML file" (https://github.com/scottjehl/Respond). How do I access the file?
A: It appears the respond.js author updated the code or rearranged the file structure. You can find respond.min.js at this URL: https://github.com/scottjehl/Respond/tree/master/dest.
 
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.

* Estimated file size

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 3.

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


OK

Upgrade to View Courses Offline

login

With our new Desktop App, Annual Premium Members can download courses for Internet-free viewing.

Upgrade Now

After upgrading, download Desktop App Here.

Course retiring soon

Up and Running with Bootstrap 3 will be retired from the lynda.com library on September 25, 2015. Training videos and exercise files will no longer be available, but the course will still appear in your course history and certificates of completion. For updated training, check out Bootstrap 3 Essential Training in the lynda.com Online Training Library.


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 ?

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:

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.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Start your FREE 10-day trial

Begin learning software, business, and creative skills—anytime,
anywhere—with video instruction from recognized industry experts.
lynda.com provides
Unlimited access to over 4,000 courses—more than 100,000 video tutorials
Expert-led instruction
On-the-go learning. Watch from your computer, tablet, or mobile device. Switch back and forth as you choose.
Start Your FREE Trial Now
 

A trusted source for knowledge.

 

We provide training to more than 4 million people, and our members tell us that lynda.com helps them stay ahead of software updates, pick up brand-new skills, switch careers, land promotions, and explore new hobbies. What can we help you do?

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.