Web Development

Creating a website from Photoshop to CSS code

Layer text and images on background layers with code

In Photoshop we will make several slices of the main content background section starting with separating the header section from the body, and then the footer section. The body background will be a separate division and we will eventually create divisions with <div> tags in the coding to piece it all back together.

Remember, you want to organize your layout in such a way that you can put them into defined divisions in rows, columns, blocks, or tiles so that they can be rendered in coding. The text and images in the PSD layout are added on top of the background layers and can be placed easily with styling code. It is the background elements that will need to be sliced, and before making the slices, I will copy the Body Background layer wood grain and save it as a separate gif file named WoodGrainBg.gif. (All the images and slices are included in the download.) For the full tutorial, see "Backgrounds in web design: Going from PSD to code."

Related: Backgrounds in Web Design: Creating a theme.

About

Selena has been at TechRepublic since 2002. She is currently a Senior Editor with a background in technical writing, editing, and research. She edits Data Center, Linux and Open Source, Apple in the Enterprise, The Enterprise Cloud, Web Designer, and...

3 comments
dstoltz
dstoltz

So is the food images a absolutely positioned div? Doesn't really explain how this image sits on top of the header and the body areas.....

galegopc
galegopc

I'm trying to get a grip of the whole process of taking a PSD file and make it a webpage and was very excited about this tutorial but shame on me not reading it all along before downloading files. Tutorial was great up to the moment you need the most that is the placement of the graphics to achieve the results you have there. I really don't want to get the ready product and trick it but still believe a tutorial is to learn and that has never happened. Nice effort but poor finalization made this tutorial senseless unless one doesn't care of learning the process but just copying your files and using them on another project. Sorry to be so harsh but it is the end result that killed it.