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

Creating image assets


CSS: Page Layouts

with James Williamson

Video: Creating image assets

Regardless of whether you create pixel- precise mockups or just sort of sketch your layouts on Post-it notes, at some point you're going to need to create the image assets for your site. Now because of the image requirements of your site will change based on multiple factors, you need to take just as much care in planning and creating image assets for your pages as you do with any other part of the process. Now to illustrate this, I'm going to return to the And remember, you can find that, if you go in the exercise files, you can find that directly in the Assets folder.
Expand all | Collapse all
  1. 4m 20s
    1. Welcome
    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 16s
    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 4s
    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 22s
  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 26s
    1. Designing for flexible layouts
      2m 30s
    2. Calculating percentage values
      8m 36s
    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

please wait ...
Watch the Online Video Course CSS: Page Layouts
8h 57m Beginner Feb 07, 2012

Viewers: in countries Watching now:

CSS: Page Layouts introduces basic layout concepts, gives advice on how to create properly structured HTML based on prototypes and mockups, and goes into critical page layout skills such as floats and positioning. Author James Williamson shows how to combine these techniques to create fixed, fluid, and responsive layouts. Designers are also shown how to enhance their pages through the creative use of CSS techniques like multi-column text, opacity, and the background property. Exercise files are included with this course.

Topics include:
  • Reviewing the box model
  • Calculating em and percentage values
  • Controlling how elements display
  • Creating fixed, fluid, and responsive layouts
  • Structuring content with HTML5
  • Floating elements
  • Using relative, absolute, or fixed positioning
  • Defining column spacing
  • Creating grid-based assets and layouts
  • Considering mobile-design-specific issues
  • Working with multi-column text
  • Enhancing page design CSS Sprites
James Williamson

Creating image assets

Regardless of whether you create pixel- precise mockups or just sort of sketch your layouts on Post-it notes, at some point you're going to need to create the image assets for your site. Now because of the image requirements of your site will change based on multiple factors, you need to take just as much care in planning and creating image assets for your pages as you do with any other part of the process. Now to illustrate this, I'm going to return to the And remember, you can find that, if you go in the exercise files, you can find that directly in the Assets folder.

And I'm going to use this to give you some examples of things that you're going to need to consider when creating image assets for your sites. Now if you don't have Illustrator installed, you can open up the PDF file of the same file that I've included in there as well. But you don't really have to open it up. We're not really doing anything here. We're not going to be exporting out any graphics. This is more a discussion of the decision-making process that I use when deciding how to deal with images within my site, and what type of images I'm going to be creating. Okay, so again, I'm just going to start at the top and talk about some of the factors involved in planning image assets for my site.

Now the first thing that I'm faced with is the Desolve logo right here. You can see it's a separate graphic, but it has the text right next to it with a tagline. And one of the things that I need to start thinking of is is this entire logo going to be an image, or can I create this typographically in CSS. Now a few years ago that wouldn't have even been a question. This is a font called Cantarell that isn't a default system font, so it was something that I would not have been able to do, but with the advent of web fonts, I'm now able to take fonts like this and use them in my web site and not have to rely so much on images.

So in this case I'm thinking that the background of the header element can certainly be handled through CSS, just assigning a color to it, and I could probably just export the logo out as a transparent PNG file and then use CSS to go ahead and style the text so that I don't have to rely on an image there and do any really complex CSS where I am hiding text and showing an image, that sort of thing. Now the next thing I have to decide are these icons, what I'm going to do, or how I'm going to treat these icons. These are all little icons that I've created in Illustrator so I've got a little camera, some word balloons there, a bag. And obviously I'm probably going to use those as background images.

But do I really need to go ahead and export out four separate icons, or is there a way that I can sort of combine these? One of the things that I'm always thinking about when I create image assets is how to create the most efficient set of assets for my site as possible. I want to make as few requests to the server so that if the site is being viewed on mobile devices, for example, that it's a little bit more responsive and it's a little bit snappier. Well, one of the things that I can do through CSS is I could combine all of those icons into a single file, and then as I show those icons as background graphics, I can just sort of move to a new location for each of those images.

That's a technique called CSS sprites that I've talked about before in a couple of my titles, and it works really, really well. Now before I went into creating my CSS sprites file for those icons, there were a few things that I had to think of. For example, you can see right down here in the Galleries, we have a larger version of that icon, and that's actually going to be consistent throughout the site. You go to the Contact page, for example, this icon is going to show up here in a much larger fashion. When I go to GEAR, that's going to show up in a much larger fashion. So do I go ahead and create sprites that are much larger and then just scale them down in the navigation? That's certainly an option.

But one of the things that we continually have to think about now as web designers is what happens when the site is viewed on a mobile device? And scaling images up or down actually impacts the performance of lot of sites on phones and things like that. So basically, I really just did a compromise. I created two sets of sprites, and I want to show those to you. These are also in the Assets folder. And we have the icon sprites 25, which is a 25x25-pixel icon, and then we have the icon sprites 50, which is a 50xS0. So I use the 50 sprites for the larger one. I use the 25 sprites for the smaller one.

Yes, it's one more request, but I've eliminated scalings. So these are all things that you have to think about, in terms of how are my graphics going to impact the performance of my site? Okay, now obviously I did not create these images here in Illustrator. The photograph of the New York City skyline, the Philadelphia photograph, the Chicago photograph, those are all the images that I imported in from Photoshop. Now the thing that I have to think about with those images, however, in time I've got these photos or any raster-based images, are they going to be represented through the use of an image tag, or am I going to use background graphics to show them? This is an extremely personal choice the designers make.

A lot of people use image tags for everything. Some people try to use almost no image tags if possible. I have a very easy litmus test for whether this is going to be a separate image using an image tag or whether it's going to be a background graphic of a structural element, and it's simply this: Would that image need to be described to an assistive device? And what I mean by that is if somebody is browsing this site on a screen reader, with the site's content to be impacted negatively if that image wasn't described or if that image wasn't there? In that case I look at an image and I say, okay, is this image purely decorative in nature? Yes, this is purely decorative in nature.

And so because of that, I'm going to use a background image for that. Same question gets put to these guys: Is that purely decorative in nature? And so you go throughout the site and you think about that. Is this something that's going to be a background image or is this something that's going to be foreground image that I'm going to use with the image tag? And that's typically how I decide it, but again, it is an incredibly personal choice. Now another thing that you need to think about when you're designing graphics for your site is, what can I handle through CSS, and what am I going to need an image to represent, and that is constantly changing, which is one of the reasons why you want to stay up with all the new CSS techniques.

Take, for example, this overlay over here. Again, a few short years ago, I would have had to create this image as a whole with that overlay as part of it and then just sort of position the text over part of the overlay to sort of fake, if you will, that box. But now CSS can handle semi-transparency. It has basically alpha settings that you can put on different color values now, and so that is actually something that we can do through CSS now, and I don't have to worry about generating that image with that overlay already in place. That actually gives me a lot of flexibility, because now it means if I want to create a layout where this particular box conflicts over that image or if it's a flexible layout where the image can get clipped behind it, then I don't have to worry about that box resizing and repositioning.

The same is true of certain icons. For example, if I scroll down and I see this inner button right here, again couple of years ago that is something that we would have to save out as a separate file, or I would have to understand that say a default button from the browser was going represent that. But now through the use of CSS and gradients and things like that I can go ahead and create that through CSS and not have to export that out as an asset. Now when you do decide that something needs to be exported out, for example, down here our Twitter icon, that icon is going to be a background graphic for us, but I'm going to need to export that out as a transparent PNG file.

Now when I do that, one of the things I'm going to do--and I'm just going to take you over to that icon. I'll export this out as a separate graphic in its own file, and when I do that, I plan out the dimensions for the file very, very carefully. So this particular file is 90x90 pixels, and understanding that and knowing that, it's going to make it a lot easier for me to position this and apply the proper amount of padding to my element so that the icon is going to show up correctly. I'll also center the icon vertically or horizontally where I want it. I might add a little bit of extra space to one side or to the top or the bottom based on how I'm going to be positioning that graphic with other elements on the page.

So when you start creating these sort of stand-alone images that you're going to export out, you have to think a lot about how it's going to interact with the other elements on the page, and do you need to modify it in anyway? What's the perfect size for it? Do you need extra space? Do you need it to be centered in any one location? So those are all things that you'll need to think about. Okay, now that is not by any means an exhaustive list of all the things that you're going to need to consider when planning images and assets for your site. I am fond of saying this and it's absolutely true: every single site is different, and the needs of images from one site to the next, they are going to change, and sometimes very dramatically.

Now what's really important here is that you spend as much time as you can thinking about how images are going to be used on your site, and what's the most efficient way to display those images, and then how to create those assets that work exactly the way you need them throughout the site and with your CSS. Now if you're looking for more information on the specifics of generating assets for your site, I recommend checking out a couple of titles in the Online Training Library. Those would be the Illustrator CS5 for Web and Interactive Design, by Mordy Golding, Fireworks CS5 Essential Training, by Jim Babbage, and Photoshop CS5 for the Web, by Jan Kabili.

Those are the three programs that I use to generate most of my assets, and those are three very, very good titles in terms of describing that process to you. Now keep in mind that we're adding new titles to the library all the time, so be sure to check out the library for new titles on that subject, but those titles go into a lot more detailed information that I can in a single movie, so be sure to check those out.

There are currently no FAQs about CSS: Page Layouts.

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


You have completed CSS: Page Layouts.

Return to your organization's learning portal to continue training, or close this page.


Upgrade to View Courses Offline


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

Sign up and receive emails about 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.