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

Solution: Styling panels and callouts

From: Up and Running with Bootstrap 3

Video: Solution: Styling panels and callouts

So, how did you do with styling those particular webpage? Hopefully you did all kinds of great things to it. So, I had asked you take this left column and turn it into a panel. So, hopefully you were able to figure out those panels inside of Bootstrap. If you did, it probably looks something like this now. And I'm going to go through how to do that in the code here in just a second. The other thing I did was I gave my parrot picture over here some rounded corners. And if you take a look at my little pallets down here underneath. I've turned these into thumbnails.

Solution: Styling panels and callouts

So, how did you do with styling those particular webpage? Hopefully you did all kinds of great things to it. So, I had asked you take this left column and turn it into a panel. So, hopefully you were able to figure out those panels inside of Bootstrap. If you did, it probably looks something like this now. And I'm going to go through how to do that in the code here in just a second. The other thing I did was I gave my parrot picture over here some rounded corners. And if you take a look at my little pallets down here underneath. I've turned these into thumbnails.

And I've made everything line up oh so nicely. And as this page gets smaller, so, as we jump to smaller resolutions here, we have the thumbnails continue to be styled this way. And as we get even smaller here, they're still looking good. And all the way down to the smaller resolutions. Now my panels stacked underneath of all these thumbnails. And so these are looking really, really good and they're working well. So, let's take a look at all the code and how I did all of this. Alright. So.

First of all, I went to the Bootstrap website, and I took a look at panels. So here's the panel documentation. And as you see here, what you need to do to make a panel is, you're going to wrap a couple of divs around things. The first div is going to have a class of panel and panel-default. And the second div will have a class of panel-body. And if you do a panel with a heading, which is what I did. As it says here, you can add this panel-heading class to any h1 or h6 as well. You don't actually have to make a separate div for it. So, if you take a look at my html.

That's in fact what I did. So we are all the way down here in our mark up all the way down here starting around line 73 is where this whole thing starts. So line 74 is the class of panel and panel default, with a /div down here on line 82. We have our panel heading here, which is wrapped around the h3, keeping your pet's chompers clean and healthy, with a /div. And then we have a div with a class of panel body wrapped all the way around the text here, and a /div underneath of that. So that's responsible for styling that left column.

Then, if you take a look up here a little further, starting around the comment here on line 31 is this nested row 3. Here's what you'll see that I did for each one of these little boxes. So, here I turn these all into thumbnails. Inside of my row, which was already there. Inside of the large 3 extra small 6 which was already there. I added a div with a class of thumbnail, followed by div with a class of caption, and then all of this text. So there's no actual thumbnail in my thumbnails.

There's just a bunch of text. But it does give this nice little box around each of those and sort of lines them up nicely. The div with a classic caption ends down here on line 40. And then when I went ahead and I took a look at these, I had some wrapping problems with the way that those thumbnails lined up. So, I've implemented some solutions to fix those wrapping problems. And where those solutions come from in the Bootstrap documentation is under CSS. If you scroll on down to the grid system And you go to the responsive column resets.

This talks about how you can use clear fix along with some of the responsive utilities or responsive classes like visible-xs. That will make this div with the clear fix appear where it's needed, and so these thumbnails wrap correctly. So I took this little bit of code, and I dropped that on in my HTML. You can see it here, on line 32. Here's that line of clear fix visible-xs. Visible lg. So, this div is visible when we're at the large grid or the extra small grids are in effect.

And that will keep this from bumping into my floated image up here at the top of the Cockatiel. So, that my boxes are all in a nice straight line. And I added that same fix a little bit further down the page here. It's on line 52. So, here's that same fix this time with the medium grid. This is preventing these last two boxes from wrapping on each other also. If you're not quite sure what I'm talking about, all you need to do is just comment out those lines. At 52 and 32. If you comment those lines out, you'll see how the boxes are not quite lining up right.

And they're not quite wrapping correctly, as the screens are going to smaller dimensions. So hopefully you came up with some kind of similar solution to all of that. And that's great. And congratulations for reading the documentation and figuring out those panels.

Show transcript

This video is part of

Image for Up and Running with Bootstrap 3
Up and Running with Bootstrap 3

37 video lessons · 23202 viewers

Jen Kramer
Author

 
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. 44m 38s
    1. Exploring Bootstrap's grid system
      9m 10s
    2. Creating new rows and cells
      14m 5s
    3. Adjusting column widths using offset
      5m 2s
    4. Changing column order using push and pull
      5m 34s
    5. Nesting columns
      3m 43s
    6. Creating a JumboTron-style layout
      3m 41s
    7. Challenge: Working with grids
      1m 31s
    8. Solution: Working with grids
      1m 52s
  4. 53m 34s
    1. Exploring basic typography: The small and blockquote tags
      4m 29s
    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 41s
    1. Implementing location breadcrumbs
      6m 38s
    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

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.

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