Table of Contents

Slicing Web Pages

refer: http://helpx.adobe.com/en/photoshop/using/slicing-web-pages.html
http://thesiteslinger.com/blog/do-we-still-slice-psds/

Introduce about slicing web pages

Understand about slices

Slices divide an image into smaller images that are reassembled on a web page using an HTML table or CSS layers. By dividing the image:

How to export slices to images

You export and optimize a sliced image using the Save For Web& Devices command:

Overview about methods to use slice

When you work with slices, keep these basics in mind

Slice Types

Slices are categorized by their content type (Table, Image, No Image) and by the way they are created (user, layer-based, auto). Slices are created using different methods:

user slices

Slices created with the Slice tool are called user slices. user slices are defined by a solid line

layer-based slices

slices created from a layer are called layer-based slices. layer-based slices are defined by a solid line

auto slices

Create a slice

You can use the slice tool to draw slice lines directly on an image, or design your graphic using layers, and then create slices based on the layers.

Create a slice with the Slice tool

  1. Select the Slice tool . (Press the C key to cycle through tools grouped with the Crop tool.).Any existing slices automatically appear in the document window.
  2. Choose a style setting in the options bar:
    • Normal:Determines slice proportions as you drag.
    • Fixed Aspect Ratio: Sets a height-to-width ratio. Enter whole numbers or decimals for the aspect ratio. For example, to create a slice twice as wide as it is high, enter 2 for the width and 1 for the height.
    • Fixed Size: Specifies the slice’s height and width. Enter pixel values in whole numbers.
  3. Drag over the area where you want to create a slice. Shift-drag to constrain the slice to a square. Alt-drag (Windows) or Option-drag (Mac OS) to draw from the center. Use View > Snap To to align a new slice to a guide or another slice in the image. See Move, resize, and snap user slices.

Create slices from guides

  1. Add guides to an image.
  2. Select the Slice tool, and click Slices From Guides in the options bar. When you create slices from guides, any existing slices are deleted.

Create Layer-based slices

Layer-based slices are less flexible than user slices; however, you can convert (“promote”) a layer-based slice to a user slice. See Convert auto and layer-based slices to user slices.

  1. Select a layer in the Layers panel.
  2. Choose Layer > New Layer-based Slice.

Convert auto and layer-based slices to user slices

A layer-based slice is tied to the pixel content of a layer, so the only way to move, combine, divide, resize, and align it is to edit the layer—unless you convert it to a user slice.
All auto slices in an image are linked and share the same optimization settings. If you want to set different optimization settings for an auto slice, you need to promote it to a user slice.

  1. Using the Slice Select tool , select one or more slices to convert.
  2. Click Promote in the options bar.

experiences

How to know what the guides and slice types were created?

Slice Types:

Convert PSD to HTML

Basic Changes:

  1. Step1: Save PSD to PNG or JPG file
  2. Step2: Using tool to get all color in PNG file
  3. Step3: Using template with HTML layout and Javascript availabe which suitable with the design, and replace colors in HTML with colors in PSD design
  4. Step4: Change layout of template base on layout of PSD design
  5. Step5: Using slice tool to slice some images in psd file
  6. Step6: Update some images from design to images in template to finish the design

Other Changes: