Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
Discover how to make your website more readable and efficient across various screen sizes and devices. Join author Chris Converse as he shares his own specialized techniques for creating a responsive site. The course takes the site from start-to-finish, from comping your ideas in Photoshop, to setting up the HTML page and containers, to styling established elements for small, medium, and large screens. In particular, Chris shows how to load images with CSS, reposition the nav bar for better viewing on mobile devices, and how to make the download time faster for small screens by providing multiple versions of your banner graphic and other images. Plus, learn how to replace graphics with high-resolution versions for Retina displays using CSS media queries.
This course was created and produced by Chris Converse. lynda.com is honored to host this training in our library.
Now, we're going to add the promo graphics to the promo areas using CSS. But before we can do that, we need to put some custom classes in the HTML so that we can target each individual promo. So let's come back to our index.html file. Let's find our promo container, and let's find the three promos that are inside the promo container. On the first one, let's come up here to the div with the class of promo. Hit a space, type the number one. We're using the actual name because we can't use numbers as a class name.
Let's find the second one. Type in two. And let's find the third one and type in three. Let's save our work. Now, we have custom classes on each one of the individual promos. Let's come back to screen_styles.css. After our promo p rule, let's hit a few returns. Let's type in .promo. This is going to target the outermost container of each of the individual promos. Let's set our brackets. We're going to come in here and set background- repeat to no-repeat so that that will be used for all of the individual promos.
Let's hit a return. Let's type .promo.O-N-E, so promo.one. Put in our brackets. In here, we're going to come in here and specify background image. Set url, set the parentheses, ../ to come out the root, images/promo_1.jpg, then a semi-colon, and you come in here and copy this entire rule.
Let's paste it two more times. For the second one, change .one to .T-W-O for two. Let's come over and change the file name from promo_1.jpg to promo_2.jpg. Change the last one to .three and then change the 1, 2, or 3.jpg for the file name, then choose File > Save. Let's come out and look at this in a browser.
Now, what we see here is the individual graphics are showing up inside of each container, so inside of each individual promo we see the individual graphics we created from Photoshop. Now, of course, you'll notice that the text is actually overlapping the individual graphics. We're going to address this when we start working on the CSS rules for our layouts.
Find answers to the most frequently asked questions about Creating a Responsive Web Design.
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.