Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now
Watching:

Incorporating images


From:

Up and Running with Bootstrap 2

with Jen Kramer

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.
please wait ...
Watch the Online Video Course Up and Running with Bootstrap 2
2h 38m Beginner Oct 12, 2012

Viewers: in countries Watching now:

Bootstrap is a free web development tool from Twitter that, with a little bit of CSS and JavaScript experience, makes building websites quick, intuitive, and fun. Author Jen Kramer explores its 12-column grid layout; typography and icon libraries; fully functional components like nav bars, buttons, and tabs; and much more. This course also shows how to add JavaScript extras like dropdown menus, modal windows, and photo carousels.

Topics include:
  • Understanding the difference between default and fluid grids
  • Nesting with fluid grids
  • Creating a thumbnail gallery
  • Adding block quotes and lists of text
  • Incorporating images and icons
  • Adding breadcrumb navigation and pagination
  • Using tabs and pills navigation
  • Making the nav bar responsive with JavaScript
  • Adding dropdown menus to the nav bar, tabs, and pill
Subject:
Web
Software:
Bootstrap
Author:
Jen Kramer

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.

Find answers to the most frequently asked questions about Up and Running with Bootstrap 2 .


Expand all | Collapse all
please wait ...
Q: I am trying to create the image carousels shown in this course, and they are not functioning properly. The custom.css file seems to be missing from the exercise files and I think this is the reason. Can you provide it?
A: custom.css isn't created until the carousel indicators are added. However, these styles have to do with the way the indicators look, and nothinghas to do with the way the carousel functions.
 
Are you sure you're working with Bootstrap 2.x? You download that from here: 
http://getbootstrap.com/2.3.2/. The carousel changed radically between Bootstrap 2.x and Bootstrap 3, and this course might not work with version 3.
 
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

* Estimated file size

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

Upgrade to View Courses Offline

login

With our new Desktop App, Annual Premium Members can download courses for Internet-free viewing.

Upgrade Now

After upgrading, download Desktop App Here.

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 ?

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:

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.

Start your FREE 10-day trial

Begin learning software, business, and creative skills—anytime,
anywhere—with video instruction from recognized industry experts.
lynda.com provides
Unlimited access to over 4,000 courses—more than 100,000 video tutorials
Expert-led instruction
On-the-go learning. Watch from your computer, tablet, or mobile device. Switch back and forth as you choose.
Start Your FREE Trial Now
 

A trusted source for knowledge.

 

We provide training to more than 4 million people, and our members tell us that lynda.com helps them stay ahead of software updates, pick up brand-new skills, switch careers, land promotions, and explore new hobbies. What can we help you do?

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.