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

Building flexible layouts: Lab

From: CSS: Page Layouts

Video: Building flexible layouts: Lab

Okay, it is lab time. Now, for the flexible layouts lab, I'm not going to make you go through the whole planning process for the desolve.org site. That would be just cruel. Rather, I am going to give you the appropriate values for the main sections, and then let you go through the layout to determine which elements to style, to achieve the desired width and spacing. You might think I am being nice to you there, but probably not. Now you'll also be determining an appropriate overall size range for the layout. You are going to be styling some interior elements and you are going to be on your own there.

Building flexible layouts: Lab

Okay, it is lab time. Now, for the flexible layouts lab, I'm not going to make you go through the whole planning process for the desolve.org site. That would be just cruel. Rather, I am going to give you the appropriate values for the main sections, and then let you go through the layout to determine which elements to style, to achieve the desired width and spacing. You might think I am being nice to you there, but probably not. Now you'll also be determining an appropriate overall size range for the layout. You are going to be styling some interior elements and you are going to be on your own there.

And then you are going to be fixing an issue with some of the images on the homepage as well. So to starting working on a lab, go into the 06_06 directory, and open up index.htm and the main.css file, which is found in the _css folder of the 06_06. Okay. Now, I just want to go into the browser really quickly. I am going to preview where you are going to start versus where you are going to finish. So this is the starting layout. You can see our columns aren't working properly. We don't even have spacing going on there.

It does flex, but it's not exactly what we think of, when we think of a flexible layout. Now this finished version, after you are done with it, it's going to look like this. We are going to be able flex the layout, but you need to set a defined range for it, so at a certain point layout is going to stop flexing and we are also going to have to deal with these two elements right here. You are going to have to come up with the appropriate measurements to get them to space properly and still flex, and then for these images in the sidebar, you are going to have make those flexible as well, but you want them to be able to display it at a native resolution if they can.

So if I go back into the styles, you can see that the main.css that I have given you all of your labs steps, but right here some information you are going to need. You have got Left document padding, you have got the Main column Width for the left column, you got the Right column Width for the right column and you have the Right document padding on that side. So, here are steps. The first thing you are going to do is go to your Basic Layout styles at about line 156. You are going to set the body width to 90% and then find an appropriate range for minimum and maximum page width, so that's going to be left up to your own discretion, and it's going to be based on number of factors, but remember, you can take some screenshots, you can take measurements of the screening, and you can kind of figure out where the layout fails once you get everything set up and help plan you range from there, so, that's actually something in terms of the minimum and maximum page width, that you might want to do once everything else is finished, so you can really determine where you still have problems within the layout.

And using the values that we have right up here, you again, want to go down into the Basic Layout styles, find the selectors for the article, in the aside selectors, find those and then set the appropriate width and padding values for both of those elements. After you are done with that, go into the Content Region styles, which you can find on about line 184. Now you are going to have to go and find the selectors that control the header, main navigation and banner regions, and then you are going to determine what property you need to modify and what value you need to set, so that it's content lines up with the rest of the page content.

For the two news selectors which are on line 347, those are the two that are side by side, you need to determine an appropriate width padding and margin to get those elements to display side-by- side within acceptable amount of padding and spacing between the elements. Now there is a lot of judgment call that's going be going on there. So your values might not match with my finished values, and that's okay. So as long as you are comfortable with the spacing of it, that's fine. Now for the contest image selector which is found on line 635 in the css, you are going to need to add a property that allows the images to display at their normal size if that's available, and then still scaling it, if the screen size is reduced.

Now, I said, you may, but that's a big hand that you are going to have to. You are going to have to go in and modify the image tags directly in the index.htm file as well. So if you go into the code and you scroll down, you are going to go into the aside and you are going to find those images right here, so about line 182 and line 77, okay. So I'm betting to that, it's probably enough to keep you guys busy for a while. Now for this lab, you may need to go back to some of the previous movies and refresh your memory about a few of the techniques that we covered. That's fine.

You'll also need to make a few educated guesses and probably employ a little trial and error on a few of the elements. And to be honest, I did that to you on purpose. Now usually when you're working with fluid layouts, especially really complex ones, your initial planning works fine up to a point. Then there are always places within the layout that you are just going to have to test and tweak in order to get the layout looking the way you wanted to. And don't forget, once you've finished to watching the solutions movie that follows this one, to compare your code to mine, and hear my take on how I solved some of these problems.

Show transcript

This video is part of

Image for CSS: Page Layouts
CSS: Page Layouts

71 video lessons · 44068 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 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.