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

Enhancing page design: Lab

From: CSS: Page Layouts

Video: Enhancing page design: Lab

Congratulations! You have made it to our last lab. In this lab we are going to turn our attention to enhancing specific page elements in a way that allows us to try out some of the skills that we learned earlier in the chapter. So I have got both of the finished files that we are going to be working on opened in a browser, and the index page is one you've seen before. There's one slight addition to it that I want to point out. Let's scroll down a little bit. You can see here we have the Featured Gallery, so New York is being identified as the featured gallery of the week, month, or year, depending upon how frequent this site is updated.

Enhancing page design: Lab

Congratulations! You have made it to our last lab. In this lab we are going to turn our attention to enhancing specific page elements in a way that allows us to try out some of the skills that we learned earlier in the chapter. So I have got both of the finished files that we are going to be working on opened in a browser, and the index page is one you've seen before. There's one slight addition to it that I want to point out. Let's scroll down a little bit. You can see here we have the Featured Gallery, so New York is being identified as the featured gallery of the week, month, or year, depending upon how frequent this site is updated.

I've also included another page this time and if I flip over to this tab, this is one of the gallery pages, and this is the Philadelphia gallery. You see we are doing some interesting type treatments here with the Philadelphia text. We've got of course our menu that is using the CSS sprites. And if I scroll down, I can see that I have some two-column text and I have images that are also in multiple columns. And by way of responsive design, you can see that those columns flex to a certain point, along with the images inside of them, and then it changes again to a smaller gallery that flexes, and then finally it changes to a single gallery that flexes a little as well.

So I am going to go into our starter pages, and we are going to talk about all the different steps that you are going to have for this particular lab. So I have the index.htm, the philadelphia.htm, and the main.CSS files open. The main.css file's found in the _css directory, inside the 08_08 folder, and the other two are found right inside the 08_08 folder. So at the very top of the main.css, I have our lab steps. Let's go through them one at a time and talk about all the different wonderful cool things that you get to do in this lab.

So our first step is dealing with CSS sprites. For this lab, by the way, we're going to stick to our desktop styles. This is responsive layout, but rather than making you do the same thing three different times or three different ways, we are just going to stick to the desktop styles. But feel free with any of these steps to go into the mobile styles or the tablet styles and really kind of see how the same task was performed there as well. So in desktop styles, around line 1069--and no, that is not a misprint-- you should find the four selectors that represent the individual elements in the menu. Remember our menu.

We had the contact page. We had the gear. We had the shopping page. We had the galleries page. Create a background property that uses the icon_sprites_25.png graphic in the images directory, to display the respective icons. Now remember the icon images are 100 pixels apart, so it's the same exact file that we were using earlier, from each other, and they are part vertically. Test out those graphics and then apply the appropriate offset to align the icons with the text. So if you think about plunging in the same values you did in last exercise, you're not quite going to work. You are going to need to go in and work with those offsets a little bit.

And as a way of kind of showing you where that is, I am going to go down to line 1069 in our code, and it does take a little bit of time to get down there. All right, there we go. So here are those four selectors I was talking about in our desktop styles: gallery, gear, interact, and shop. So just make sure the appropriate icon is displaying for those. So I am going to scroll back up. Your second step is in the desktop styles, find the banner paragraph selector. That's line 1102. And you are going to modify the paragraph so that the background color is at 80%, while the text itself remains opaque.

If I show you the finished version of that, you have seen this before, but this is what we are talking about. We want to make sure that this is semi-transparent, but the text remains opaque. And again that's about line 1102. The next step is in the desktop styles, find the New York preview gallery selector. That is on line 1163. You want to modify that background so that the featured.png in the images directory is layered on top of the existing background graphic and is positioned against the left edge and 50 pixels from the top edge.

Now that sounds like a lot, but if I go into the finished version of this--and you just want to make sure that it's aligned 50 pixels down and aligned to the left edge. And again you want to add that featured gallery PNG file to that particular element. Now going into the philadelphia.htm page, in terms of its desktop styles--now they are all in the same main.css, but this is going to be affecting items on the philadelphia.htm. In the desktop styles, which is on line 1176, find the intro and the photos selectors and modify them so that their content displays in two columns with a .5em gap between the column, so we are going to have to do some multiple columns here.

In the desktop styles, which is on line 1168, find the gallery h1 selector and add a text shadow that adds two shadows. The first should be the color (226,100,100) with a vertical offset of -.1ems and a blur of .02ems. The second should be rbg(102,151,188) with a vertical offset of .1em and a blur of .02ems. Both shadows should be at 60% opacity. Of all the instructions I have given you so far, that's the one where I can see a lot of people just going, what in the world is he talking about? But if I go over into the browser, into the Philadelphia page, you can see the text Philadelphia. And essentially the red version of it and the blue version of it that are below it, and it sort of gives the illusion that you have this text sort of coming together to make the purple version in the little.

But those are text shadows, and if you remember from earlier in the chapter, you're able to string text shadows together. You can apply multiple text shadows in one declaration. So what you want to do is you want to use the measurements that I have given you here in the steps as a guide, and you want to create text shadows that are going to create that special effect that we've got up there inside the Philadelphia page. That should keep you busy for a little while. Now I know that some of the things that I ask you do, especially like that text shadow right there, those are pretty specific instructions. So I want you to kind of be creative. Feel free to play around with some of those properties. Experiment with some of the different values to see what other styling effects you can come up with, based on what we have covered in this last chapter.

And as always, be sure to watch the solutions movie right after this one to compare our code and to discuss my approach to the solutions and see how it compares with yours.

Show transcript

This video is part of

Image for CSS: Page Layouts
CSS: Page Layouts

71 video lessons · 41501 viewers

James Williamson
Author

 
Expand all | Collapse all
  1. 4m 20s
    1. Welcome
      54s
    2. How to use the exercise files
      3m 26s
  2. 1h 39m
    1. Box model review
      8m 47s
    2. Calculating element dimensions
      11m 11s
    3. Understanding margin collapse
      7m 59s
    4. Calculating em values
      7m 41s
    5. Calculating percentage values
      7m 51s
    6. Normal document flow
      13m 3s
    7. Controlling element display
      8m 53s
    8. Using CSS Resets
      7m 11s
    9. Fixed, fluid, and responsive layouts
      9m 9s
    10. CSS debugging tools
      6m 46s
    11. Using the Firebug Inspector and the WebKit Web Inspector
      11m 5s
  3. 53m 15s
    1. Page design workflow
      3m 6s
    2. Page design tools
      4m 56s
    3. Determining page structure
      7m 18s
    4. Creating image assets
      8m 58s
    5. Creating initial page structure
      7m 3s
    6. Adding meaning with classes and IDs
      5m 23s
    7. Structuring content with HTML5
      6m 6s
    8. Building internal structure
      10m 25s
  4. 1h 36m
    1. Floating elements
      7m 50s
    2. Clearing floats
      7m 28s
    3. Containing floats
      7m 50s
    4. Clearfix technique
      10m 38s
    5. Floating inline elements
      14m 34s
    6. Two-column floated layouts
      8m 17s
    7. Three-column floated layouts
      11m 30s
    8. Column height considerations
      7m 3s
    9. Creating equal-height columns
      10m 42s
    10. Floats: Lab
      5m 25s
    11. Floats: Solution
      5m 21s
  5. 51m 42s
    1. Relative positioning
      7m 59s
    2. Absolute positioning
      8m 59s
    3. Fixed positioning
      4m 23s
    4. Controlling stacking order
      8m 31s
    5. Clipping content
      8m 21s
    6. Controlling content overflow
      5m 38s
    7. Positioning elements: Lab
      3m 59s
    8. Positioning elements: Solution
      3m 52s
  6. 48m 46s
    1. Design considerations for fixed layouts
      3m 28s
    2. Establishing the layout grid
      7m 57s
    3. Defining column spacing
      9m 30s
    4. Applying the grid through CSS
      8m 56s
    5. Creating grid-based assets
      8m 26s
    6. Grid design resources
      6m 22s
    7. Building fixed layouts: Lab
      4m 7s
  7. 44m 35s
    1. Designing for flexible layouts
      2m 30s
    2. Calculating percentage values
      8m 45s
    3. Setting flexible width values
      6m 6s
    4. Making images flexible
      8m 10s
    5. Setting minimum and maximum widths
      7m 24s
    6. Building flexible layouts: Lab
      4m 53s
    7. Building flexible layouts: Solution
      6m 47s
  8. 49m 36s
    1. Responsive layout overview
      3m 49s
    2. Using media queries
      7m 16s
    3. Organizing styles
      8m 39s
    4. Making content responsive
      8m 33s
    5. Mobile design considerations
      7m 32s
    6. Building responsive layouts: Lab
      4m 23s
    7. Building responsive layouts: Solution
      9m 24s
  9. 1h 22m
    1. Creating multi-column text
      6m 36s
    2. Using borders to enhance design
      13m 59s
    3. Rounding corners
      6m 56s
    4. Adding drop shadows
      10m 35s
    5. Working with opacity
      6m 8s
    6. Utilizing the background property
      15m 5s
    7. Working with CSS sprites
      7m 58s
    8. Enhancing page design: Lab
      6m 22s
    9. Enhancing page design: Solution
      8m 38s
  10. 6m 25s
    1. Additional resources
      6m 25s

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 CSS: Page Layouts.

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

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

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.