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:

Styling the header for medium screens


From:

Creating a Responsive Web Design

with Chris Converse

Video: Styling the header for medium screens

Now we're going to create some CSS rules that are going to target medium screen sizes. So let's come back to our text editor. Let's choose File > Open. From the myWebsite folder, I'm going to the css folder, and let's open screen_layout_medium.css. Now, this file is only going to be referenced when the viewport is between 501 pixels and 800 pixels. So inside of here, the first rule we're going to target is going to be the header. Let's add our brackets.
Expand all | Collapse all
  1. 7m 39s
    1. Previewing the final project
      4m 0s
    2. About the exercise files
      1m 15s
    3. Exploring the software you'll need to complete this course
      49s
    4. Beginning your project
      1m 35s
  2. 3m 45s
    1. What to expect with Design view in Dreamweaver
      2m 1s
    2. Accessing code for HTML and CSS in Dreamweaver
      1m 44s
  3. 9m 19s
    1. Planning your layout
      2m 47s
    2. Adding the main HTML containers
      1m 47s
    3. Adding the promo containers
      31s
    4. Adding links and the copyright
      1m 47s
    5. Adding sample content into the HTML containers
      2m 27s
  4. 8m 37s
    1. Creating and slicing multiple-sized banner images
      5m 53s
    2. Exporting content and template artwork
      2m 44s
  5. 7m 27s
    1. Linking CSS files for all screen sizes
      1m 42s
    2. Linking CSS files based on screen size with media queries
      2m 13s
    3. Enabling Internet Explorer 7 and 8 to understand HTML5
      1m 25s
    4. Setting the viewport scale
      2m 7s
  6. 9m 0s
    1. Adding the background pattern and the page container color
      3m 43s
    2. Styling the headings
      2m 17s
    3. Styling the body text and the links
      1m 15s
    4. Styling the footer
      1m 45s
  7. 9m 49s
    1. Understanding compound rules
      2m 58s
    2. Styling the promo links with a CSS sprite
      2m 48s
    3. Styling the promo text
      1m 26s
    4. Adding the promo images with CSS
      2m 37s
  8. 7m 46s
    1. Adding CSS rules for layout
      2m 8s
    2. Styling the header on large screens
      2m 34s
    3. Styling the article on large screens
      3m 4s
  9. 6m 29s
    1. Styling the navigation links
      2m 1s
    2. Styling the navigation for large screens
      1m 16s
    3. Positioning the navigation for large screens
      1m 37s
    4. Clearing the float for the promos
      1m 35s
  10. 2m 47s
    1. Adding CSS rules with inline media queries
      2m 47s
  11. 6m 0s
    1. Styling the header for medium screens
      2m 32s
    2. Styling the navigation for medium screens
      1m 10s
    3. Styling the promos for medium screens
      2m 18s
  12. 12m 7s
    1. Styling the header for small screens
      2m 27s
    2. Styling the navigation for small screens
      1m 12s
    3. Styling the navigation links for small screens
      4m 13s
    4. Styling the promos for small screens
      2m 57s
    5. Styling the footer for small screens
      1m 18s
  13. 13m 12s
    1. Additional exercise files for this chapter
      1m 4s
    2. Creating double-sized graphics for high-definition screens
      4m 45s
    3. Replacing the promo graphics with CSS media queries
      2m 42s
    4. Replacing the logo and banner graphics with CSS media queries
      4m 41s
  14. 35m 46s
    1. Additional exercise files for this chapter
      1m 7s
    2. Creating graphics optimized for printing
      3m 35s
    3. Including additional content for printed pages
      2m 0s
    4. Creating print-friendly CSS rules
      5m 14s
    5. Revealing hyperlink URLs for a printed page
      4m 28s
    6. Redefining the promo and footer styles
      2m 19s
    7. Background images vs. image tags
      1m 52s
    8. Image option one: Using background images
      5m 15s
    9. Image option two: Adding image tags
      6m 44s
    10. Adding CSS page breaks
      3m 12s
  15. 57s
    1. Where to go from here
      57s

please wait ...
CSS Tutorials | Creating a Responsive Web Design
2h 20m Beginner Oct 04, 2012 Updated Feb 18, 2015

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.

Topics include:
  • Understanding your software needs
  • Planning your layout
  • Adding containers, content, and links
  • Creating and slicing multiple-sized banner images in Photoshop
  • Linking to CSS files with media queries
  • Setting the viewport scale
  • Styling headings, body text, and footers
  • Styling and repositioning navigation links
  • Swapping high-resolution graphics for Retina displays
Subjects:
Design Web
Software:
CSS
Author:
Chris Converse

Styling the header for medium screens

Now we're going to create some CSS rules that are going to target medium screen sizes. So let's come back to our text editor. Let's choose File > Open. From the myWebsite folder, I'm going to the css folder, and let's open screen_layout_medium.css. Now, this file is only going to be referenced when the viewport is between 501 pixels and 800 pixels. So inside of here, the first rule we're going to target is going to be the header. Let's add our brackets.

We're going to set a height of 200 pixels. This matches the height of the medium-sized banner graphic from Photoshop. Let's hits a space. Next we're going to set background. Those properties are going to be url inside of the parentheses ../images/banner_medium.jpg. Outside of the parentheses we'll set the repeat to no-repeat.

For the x position we'll set this to 90%, and for the y position we'll set this to zero pixels. Next rule, header a.logo. Beginning and ending bracket. Let's put those open. So what we're going to redefine for the logo is going to be the width, so that's at 115. Let's set the height to 70 pixels. Again, this matches the dimensions of the Photoshop graphic for the medium logo.

Next we'll set a top property of 20 pixels and a right property of 20 pixels as well. The last property we're going to set is going to be background-image: url(../images/logo_medium.png);. Now with these in place, let's choose File > Save. Let's come back to our browser. Let's hit Reload.

Now in our browser we're going to resize the window. When we get lower than 800 pixels we'll see that the logo now get smaller. We'll see that the size of the heading now stops at 200 pixels, and the actual graphic in the background changes from the large graphic to the medium one. So if I resize this back, we'll see this is the large and this is the medium. So now that the header and logo are now being styled between large and medium screens, we'll work on the navigation next.

Find answers to the most frequently asked questions about Creating a Responsive Web Design .


Expand all | Collapse all
please wait ...
Q: This course was updated on 12/12/2013. What changed
A: There is a brand new chapter, "Supporting High-Definition (Retina) Displays," and new exercise files containing higher resolution graphics.
Q: This course was updated on 02/18/2015. What changed?
A: In this update the author covers adding CSS rules to optimize your webpage for printing, in a new chapter called "Creating Markup and Styles for Print."
 
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.

* 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 Creating a Responsive Web Design.

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.