How To Create A Web Page Shadow Using Photoshop Slice Tool and HTML Coding

Sep 4
09:08

2009

Sandee Lembke

Sandee Lembke

  • Share this article on Facebook
  • Share this article on Twitter
  • Share this article on Linkedin

For an interesting 3D effect, add a web page shadow all the way around your entire page. Read these step by step instructions or watch an informative Video Tutorial which demonstrates the Photoshop Slice Tool and explains the required HTML coding.Read these step by step instructions or watch me do it in a video tutorial.

mediaimage
High Level Process

  • Create 2 blank documents in Photoshop,How To Create A Web Page Shadow Using Photoshop Slice Tool and HTML Coding  Articles one smaller than the other
  • On the smaller one, add a Photoshop drop shadow all the way around image
  • Drag the smaller document on top of the larger one to create one flattened image
  • Use the Photoshop Slice Tool to slice the image into 3 smaller images and upload as 3 separate gifs
  • Create a table in your HTML document within the body to hold gifs and content

Step By Step


Width is the same as your website template (ex. 950 pixels). Height does not matter but should be big enough to easily use Photoshop Slice Tool (ex. 250 pixels). Color should be the same as your website body.

Create the smaller of two documents in Photoshop.

Width should be smaller than the larger document (ex. 800 pixels). Height should be smaller than the larger document (ex. 100 pixels). Color should be the same as your content area.

Add a Photoshop Drop Shadow to the smaller document.

In the Layers Palette, double click on the word "Background" and change it to any other name. This will free up functionality and allow you to easily add a drop shadow. Open the Layers Style dialog box, click on "Drop Shadow" and set the variables as follows:

  • Opacity 75%
  • Angle -90 degrees
  • Distance 0 px
  • Spread 35%
  • Size 35 px
  • Color #7B7979 (gray shadow)

Drag the smaller document on top of the larger document to create one image. Using the examples above, this image will be 950 pixels wide by 250 pixels high with the smaller, shadowed image embedded on top of it.

Slice the document into 3 smaller images horizontally. Grab the Photoshop Slice Tool from the Tool Palette. In the top toolbar, set the Style to "Fixed Size" to ensure exact proportions. Using the 950px X 250px example, input width and height as follows:

  • Top slice equals 950px X 100px
  • Middle slice equals 950px X 50px
  • Bottom slice equals 950px X 100px

Now you have one document sliced horizontally into 3 smaller images. The next step is to "Save For Web" and upload each image as a separate gif. In the "Save For Web" dialog box, save each slice separately by clicking on the slice and naming it. Upload the 3 gif images as usual.

Create a table in the body section of your HTML document to hold the shadow gif images and your content. The first row in your table contains the top shadow gif, the middle row contains your middle shadow gif and content and the last row in your table contains the bottom shadow gif.

Creating a web page shadow using the Photoshop Slice Tool and HTML coding ensures that you do not end up with a jagged, unprofessional looking shadow. If you use this process, you will undoubtedly achieve the results you are looking for.