Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
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.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
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.
Your file was successfully uploaded.