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

Incorporating images

From: Up and Running with Bootstrap 2

Video: Incorporating images

So this page is looking better than when we started, but it's still lacking in a lot of color and a lot of interest, and one of the things that we could do to make page more interesting and break up the text a little bit, of course, would be to add a few images. But in addition to that, I'd like to tell you about some great image treatments that ship with Bootstrap that are really fun. You can take a square image and apply a style to that. We will make it appear round on your web page. There is a treatment that will give you rounded corners on the images, and there is also something called the Polaroid treatment, it will put a gray line around your image, as well as a white border.

Incorporating images

So this page is looking better than when we started, but it's still lacking in a lot of color and a lot of interest, and one of the things that we could do to make page more interesting and break up the text a little bit, of course, would be to add a few images. But in addition to that, I'd like to tell you about some great image treatments that ship with Bootstrap that are really fun. You can take a square image and apply a style to that. We will make it appear round on your web page. There is a treatment that will give you rounded corners on the images, and there is also something called the Polaroid treatment, it will put a gray line around your image, as well as a white border.

So, there are some images inside your exercise files, so make sure you go ahead and copy those into your Bootstrap site, and we're going to hop in Dreamweaver here, we'll go ahead and add those images. So the first place I'm going to add an image is right here after Art in Full Color. In fact, right inside this paragraph here, describing Art in Full Color, I'm going to go ahead and add my image tag, so image source equals, and as always we can browse for that. I'm going to pick the flower here from your images folder and say OK.

These are just sort of decorative pictures, so I'm just going to give them an empty alt tag. It's not really important that people with disabilities are able to see these pictures, you can certainly put in a description for them if you wish. Then I'm going to scroll on down the page here, and I'm going to insert another picture. Let's scroll on down to right here, Tuesday, March 6, just before the strong tag here, between the paragraph, I want to go ahead and insert another image file.

And once again, we can browse for the image and here I am going to put in the picture of this artist. And once again, I'm just going to leave a blank alt tag, we should always include that alt tag, though. And then finally, I'm going to scroll in down the page here to just before Exhibits A & B, so this is around line 60. I'm going to go ahead and add an image tag right here inside of this paragraph, and this particular image that I'm going to put in is the picture of the road, and once again, a blank alt tag.

Okay, so I've just added three images to my document, if I go ahead and say File > Save, and I pop in to Firefox and I take a look at my page and I Refresh, you'll see that I have these pictures, so here's my picture of the flower, down here is a picture my artist, and down here at the very bottom is the picture of the road, and it looks a little bit chunky and blocky, so I'm going to add some additional styles to these to give them those treatments that I discussed. Let's switch back to Dreamweaver and scroll back on up the page here to the flower image, and I'm going to add some classes do this.

So the big class I'm going to add to this is image, img-circle, which will give us a treatment of a circular image. So if you just do that much and save your page and take a look at it in Firefox, you'll see that, lo and behold, your squared-off image has now become a circle, and it looks great. I am now also going to float this on over to the right side of the page. I don't think it really works over here on the left side. So, inside of Dreamweaver, I'm going to add a second class, it's our old friend pull-right, which will float the image over to the right side of the page.

So we'll go ahead and save that again, take a look at it in Firefox, and you'll see we have a nice round image over here pushed to the right side of the page, looks a lot better. So that's one of the treatments that's available to you in Bootstrap image, img-circle will give you the circular images. Now if we go back to Dreamweaver again, and we scroll on down the page, back to our second image here with the image of the artist, I'm going to go ahead and add another class, and I'm going to give this a class of img-rounded, which will give it rounded corners, and in addition to that I'm also going to do the same thing again, I'm going to do a pull-right to make it float to the right side of the page.

Save this again, and if you refresh it here inside of Firefox, you'll see that we have our image of our artist over here floating out to the right side of the page. You'll see that the image corners on this are also rounded, which is a nice treatment. Last, we're going to give this road picture down here a treatment, so scroll on down in your document to the road picture, and for this one we'll go ahead and add a class for it, and the class is img-polaroid, and once again, I'll add a pull-right to that particular class and go ahead and Save that, and we'll Refresh that inside of Firefox, and you'll see that we now have our image of the road over here on the right side of the page.

You see that we have a nice gray border going around that with some white in between. If I had a different color background, that white in between the light gray line and the picture would stay white, which explains the name Polaroid. So there we go, three image treatments here inside of Bootstrap. You can make use of these very, very simply with a single class, the Polaroid treatment, the Rounded corner treatment, and of course, the Circle treatment up here on the top.

Show transcript

This video is part of

Image for Up and Running with Bootstrap 2
Up and Running with Bootstrap 2

32 video lessons · 20478 viewers

Jen Kramer
Author

 

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.

Join now Already a member? Log in

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

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

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.

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.