Start learning with our library of video tutorials taught by experts. Get started
Viewed by members. in countries. members currently watching.
In the middle of the page we've been working on between the two days of events, there is a testimonial, it's right here on the page. It's really, really easy to miss it, because it's pretty much buried in all of the text that's going on around it on the page. Fortunately, Bootstrap has some built-in styling that you can apply to a quote like this to make your text pop out just a little bit more. So if you hop on in Dreamweaver, and we're going to scroll down the page here to line 38, and you'll see that we have the quote, "This is simply an amazing conference.
I'm inspired by it each year I attend." That's a paragraph, followed by a paragraph with a person who said it, Katie Cross, and we're going to go ahead and give this a little bit of styling. It's not really marked up correctly anyway, because since this is the quote from somebody, it should really be contained within a blockquote tag. So we'll start with that, we'll give it a blockquote tag and indent the quote, indent the name of the person who said it, and /blockquote will close that.
If we just do that, and we do a File > Save, Ctrl+S or Command+S to save and then view it in the browser, by Preview in Firefox, scrolling down to see it, you'll see that just by putting it in the blockquote tag and marking it up correctly, the text is automatically bigger. You'll see that we have a little border over here on the side which makes it stand out just a little bit, so that was a nice treatment that you can add to that. The next thing that I want to do is deemphasize the person's name.
I want the quote to be more important, so I'd like the text to be a bit bigger, and the person's name to be a bit smaller. And one of the ways that we can do that is with a small tag. Small tag is one of these tags that's come back in HTML5, and we will go ahead and add that now. So right around the name of the person here, instead of just leaving it the way it is, we can put in small tag and /small on the other side of the person's name, and if we save that, and we hop back to Firefox here and Refresh the page, you'll see that the person's name becomes, in fact small, and it's also a lighter gray, scaled back in emphasis just a little bit.
You'll also notice that it puts a character in front of that person's name, that long em dash that's there. So the tilde that I'd put in front of the name before when I typed in the text really isn't necessary anymore, so let's get rid of that. In Dreamweaver we can just get rid of that little character right there and then once again Ctrl+S or Command+S to save and refresh here in Firefox. So the styling for that quote is a lot better. One of the additional things that we can add to the blockquote tag would be the ability to float this quote left or right on the page, and so in Dreamweaver, if in the blockquote tag you go ahead and add a class of either pull-left or pull-right, this will float your quote on the page.
So I'm going to go ahead and save that again. I'm going to take a look at that in Firefox. And so you see here that the quote is here, and it is indeed floated left, it's caused the heading here for Tuesday, March 6, to be pulled up on the page, which is what happens when you have a float that isn't cleared afterwards. So that could be a treatment that will work on some pages. It certainly doesn't work on the page that we're looking at here, but it may be something that you want to do. Remember, pull-left and pull-right are two classes that you can insert pretty much anywhere inside of a document that will cause that element to float left or float right.
This one obviously would need a bit more styling if we decided to use it here. And it is possible to do custom styling inside of Bootstrap. I am going to cover that in a later video in this chapter, the correct way of doing custom styling with Bootstrap to keep your website maintainable. So I don't really like the way that looks. I'm going to go back and pull that class out in Dreamweaver. So I'm just going to get rid of that class of pull-left, but just know that it exists in case you happen to want to do that. So this is a nice built-in styling feature here inside of Bootstrap.
We've got some start for styling the quote and making it stand out of the page a little bit. You can certainly enhance that with your own styles to give it a little bit more polish and stronger treatment if you wish.
Find answers to the most frequently asked questions about Up and Running with Bootstrap 2.
Here are the FAQs that matched your search "":
Sorry, there are no matches for your search ""—to search again, type in another word or phrase and click search.
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.