Slice and code a layout Tutorial

Info & Save:

Category:
CSS
Date added:
09-08-07
Level:
Intermediate/Advanced
Author:
Celox
Save to:
Delicious   Digg   Stumbleupon

Intro:

In this css / xhtml tutorial I'll show you how to slice a design in Photoshop, and how to code it from scratch in CSS and xHTML.

Step 1:

For this tutorial I advice you to use my original PSD, from the full gaming template, your could be a few pixels off somewhere which will leave you with another result.

Download Full gaming template PSD

Step 2:

Now we got the template opened up it's time to take the slice-tool

Free Photoshop CS2 tutorial - Slice and code full gaming template

Start by making a slice on the left, from the left to the gray side part of the template. Preview of my slice is below, slice goes all the way to the bottom of the template (NOTE: I marked my slice-lines red so you can see the lines better).

Free Photoshop CS2 tutorial - Slice and code full gaming template

Basicly what we have to do with slicing is chop the template in little pieces, some pieces you won't use for the coding and to get the template to work, so we don't rename these pieces to a proper name like we didn't with the first slice. For ex. The slice of the header we'll rename to header and other images we have to use for the design, you'll get this in a second, it's a bit tricky at first but with some practise you'll master this slicing business!

Step 3:

Now make the slice for the header, start from the right top edge of the first slice and make the slice to the edge of the gray part of the design, same point as where it started but then reversed. Preview below of the bottom-right edge of this slice.

Right-click the slice and choose "Edit slice options", and rename it to header, press OK.

Free Photoshop CS2 tutorial - Slice and code full gaming template

Now make the same slice as the first slice but then on the right side, preview of the part between the header and the right side below.

Free Photoshop CS2 tutorial - Slice and code full gaming template

My full progress so far:

Free Photoshop CS2 tutorial - Slice and code full gaming template

Step 4:

For the top 3 bars of this design we need to chop these in 3 parts, the top left bar, top content bar, and the top right bar. Start by slicing from the bottom-left corner of the header slice, to the hard edge of the menu bar. Previews below.

Free Photoshop CS2 tutorial - Slice and code full gaming template

This is a more zoomed in preview of the right-side of the left menu bar slice.

Free Photoshop CS2 tutorial - Slice and code full gaming template

Rename this slice to lm_top, lm stands for left menu.

Tutorials
Links
Advertisements