Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
You might have noticed the learn more link next to the session names here on this program. They aren't styled really nicely. It would be so much better if they looked more interesting and certainly more compelling to click on them. Fortunately, Bootstrap comes with a number of styles that will make those links more interesting. In fact, we can make all of those links look exactly like buttons if we wanted to. So I'm going to go ahead and apply some treatments to these learn more links to make them look more interesting, more clickable, pop-off the page a little bit more than they do right now.
So if you go to Dreamweaver and scroll on down to the first instance of these learn mores, which I think is around line 24, Art in Unexpected Places, you'll see that we have here the a tag with a learn more link inside of it. There are a number of things that we can do to give this a treatment. So one thing that we could do is simply use that small tag which I covered in a previous video, and you can wrap the small tag around the link itself, and if I just save that, Ctrl+S or Command+S to Save, and Refresh this inside of Firefox, you'll see that I've now made the text slightly smaller next to the names, which is good.
It doesn't look like it's competing with the name of the session anymore as it did before. If you take a look at Art in Full Bloom, it looks like it's Art in Full Bloom learn more as opposed to Art in Full Bloom, learn more. So this is pretty good, but we can make it a lot better using Bootstrap's button classes. So I'm going to go back into Dreamweaver, and I'm going to pull that small tag out. And instead, I'm going to go ahead and apply some classes. So at the most basic if we apply a class inside of the href tag here, you set a class of btn for button, and save that and take a look at it in Firefox, Refresh one more time.
You'll see that the learn more link here actually looks like a button. It's squared, it has rounded corners, it has the word learn more in it. When I roll my mouse over it, it looks like the button is slightly depressing. So that I think is definitely an improvement over what we have for the other learn more links here on the page right now. One of the other things you might be interested in doing is adding some kind of color to it. Those are available to you as well. Back to Dreamweaver here, as an additional class that we can add on here, there is btn-primary, that will make this button a blue color, sort of the primary styling for buttons on a Bootstrap web page.
So if I go ahead and Save that, and I Refresh this inside of Firefox, you will see that the button becomes blue. We've seen this before, we did this in the Hero unit, and when you roll over it, you'll see that the color does change a little bit, but we have a few more options. So if I scroll on down the page, the next instance of this, and I give this a class of btn and btn-info, this is going to make a light blue button. And I can keep on going down the page. There's a number of these, so let's just go ahead and put them all in, class for the next one, remember to put in btn for the generic buttons styling and then the second class will apply a color to it.
So btn-success will give you a green button. Here at the next link, btn btn-warning will give you a yellow button. Down here, btn btn-danger will give you a red button, class= that does help.
And then one more down here, class="btn btn-inverse" which will give you a black button. So I'm going to go ahead and Save this, and we can put it in Firefox and Refresh, and we'll have multicolored buttons, so you can see all the different color buttons that you have here that all ship with Bootstrap. Now notice the names of the classes that I gave you for these button-primary, button-info, button-success, button-warning, button-danger, and button-inverse. None of these are tied to a color name, and that's done very deliberately so that you can override these colors with your own colors.
So you can think about these buttons in terms of their functionality, the primary button, treatment that you're going to have, an informational button, a button indicating success, a button indicating a warning, and so forth. That is why these names exist, and that's why there are so many of them inside of Bootstrap. One final thing we can do with our buttons is we can change their size. So back to Dreamweaver again here for a moment, and I'm going to go back on up to the top page, back to line 24 where we have our first button. There are different sizes of buttons that come with Bootstrap.
We've been seeing the default size here, so there are three other sizes that are available. So I'll go ahead and show those to you as well. If as a third class you add to this tag, btn-large, you'll make a large button. We did that with the Hero treatment in the previous video. Or if the next one here, if you say btn-small will make a smaller button, and we can go even smaller down here with the success button, btn-mini, which will make a very small button.
So once again, go ahead and save this, take a look at it in Firefox, and you'll see we have a large button, we have a small button. You can compare that with this yellow button down here at the bottom, which is the standard size. So we have a small button, and we have a mini button. So you're welcome to go ahead and try out those particular classes and see what you can do here in the web page. I recommend not overriding any of these colors just yet. I'm sure you're more than capable of doing that in the CSS, but I have a way that I'd like for you to do that.
And just wait a couple more videos, and I will cover how to override the core CSS with your own.
Get unlimited access to all courses for just $25/month.Become a member
58 Video lessons · 66267 Viewers
61 Video lessons · 96774 Viewers
56 Video lessons · 110475 Viewers
82 Video lessons · 105161 Viewers
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.