Photo CSS Sprites for WordPress — Free PSD
Contents
This Tutorial will show you step by step how to build an attractive menu using sprites for your WordPress Photo website. I have used this feature on the below demo site:
The menu is placed in the header.php of the WordPress theme (here its Semiomantics XO) in replacement of the navigation.
1. Create the Image file in Photoshop
The image file consists roughly of a Filmstrip serving as mask and then the images which are inserted into the film strip. In the normal position, the images are dimmed by a black fill layer at about 75% opacity.
The final image looks as follows:
Download the PSD File
Download my PSD file from HERE.
Open the PSD file in Photoshop and inspect it
When you open the file in Photoshop, you will find 3 folders in the layer stack:
The bottom folder contains the lower film-strip, the next folder concerns the upper film-strip and on top you find the Semiomantics XO Photo Publishing ad which I kick in as a bonus.
To start, just make the “ad” folder invisible by clicking on the eye icon placed to the left of the “ad” folder.
Edit the Lower folder
Then expand the folder called “lower” and inspect its content. The lower folder represents the images we will see when hovering with the mouse over the final menu.
At the bottom of the stack you will now find a green and a black background layer. Use whatever you feel more comfortable with, I suggest to use green for editing and if you publish on a dark website, save the final image with the black layer switched on.
On top of the background there is an empty Image Layer which is just a placeholder to show you where to insert images.
After that come the images I have inserted and which you will replace with your own photos or graphics.
How to Insert your own Photos
I did not create a set of re-sized pictures for the purpose; I just placed photos using the “Place” feature: go File — Place, select a photo from your hard drive and place it on the canvas. When it flies in, it comes with the “transform” handles and you can easily move it into position and re-size it before confirming the placement.
Do this with 4 Photos and delete my pictures.
Make sure you place all your images above the green or black background layer and BELOW the Mask layer.
Mask layer and Spocket Holes
If you wish, just edit their style by double clicking the Mask layer for example (the layer style pane pops up) and by changing the color using a Color overlay or a gradient or any other style.
Also you could fill the Spocket Holes with any color or texture, by selecting the layer (hold down the control key and click on the layer — you get the marching ants around the holes and can fill them using the Fill tool from Edit — Fill.
Text Layers
The Text layer is a Kodak type of text layer which gives the typical film look. You may delete it and create your own texts. I kept it more or less as is as on the hover function the look is more important that the menu list item title.
I have just added as a sample a layer called Yorgo which can serve as a sample for your own text layer.
We are now finished with the lower folder.
Edit the Upper Folder
Expand the “upper” folder. In my case I used the same images, however you may load different images.
If you use the same image, just select your image layers from the “lower” layer (hold down the ctrl key and select the 4 images) then right-click on the selection and go “Duplicate Layer”; you will now get the 4 image copy layers just above the originals and note, the copies are now selected: with the mouse just push these 4 image copies up into the “upper” folder and drop them above the “Image Layer”. Then delete my images. Now your layers are correctly organized, but your images have not moved.
While your 4 images in the “upper“folder are still selected, use the Move Tool from the tool box and hold down the “shift” key while you drag the images up from the lower part of the canvas to the upper film-strip.
This operation will place your images automatically properly in the upper film strip.
Note now that your Images show as in the lower layer, however they appear dimmed.
How to create the Dimming Effect
To achieve the dimming effect you could just load a black color fill layer on top of the photo layers and fill it with some 75% black. To make this sample more interesting, I have placed with each image a separate fill layer, which allows you to create for each image a different color layer with different fill factors.
These layers are referred to as Layer 1, Layer 2, Layer 3 and Layer 4 in the upper folder.
Example:
If you also re-style the mask, you could get some interesting effects:
Of course you could also use patterns for the overlay effect:
Ok,OK, it’s always the same … so lets go funky-freaky-grungy-trashy:
Enough … as you see, your creativity and imagination are the limit.
2. How to Edit the Text
To get rid of the Kodak stuff, like the image numbers top and bottom of the film-strip, just delete or hide the “Text” layer.
Then, you notice the other text layers on top of the stack: GREECE, LIFESTYLE, ARCHITECTURE, NATURE and YORGO’s; just modify the text by editing these text layers or delete them and create your own. I have used these text layers as menu labels. The font I used is Gotham but you could use Myriad pro which is just perfect and Kodak like.
If you use, as I do, the best WordPress theme framework, Semiomantics XO, it will be easy to just copy what I am doing here. If you use another Theme, you will have to adapt the instruction to your theme.
Insert your Menu into XO for WordPress
Edit header.php from your XO theme or, if you use a child theme, copy header.php from your XO theme folder to the child theme folder and edit it in your text editor (PSPad for example).
From your original XO header.php delete lines 144 — 153 (they concern the Navigation bars) and ad at the same place your menu links and a style class like so:
<div class="sprites"> <a href="http://photo.yorgoopress.com/nature-photography/" class="sprite1" title="Nature Photography by Yorgo Nestoridis"></a> <a href="http://photo.yorgoopress.com/architecture-photos/" class="sprite4" title="Lifestyle Photography by Yorgo Nestoridis"></a> <a href="http://photo.yorgoopress.com/lifestyle/" class="sprite3" title="Lifestyle Photography by Yorgo Nestoridis"></a> <a href="http://photo.yorgoopress.com/greece-photos/" class="sprite2" title="Yorgo Nestoridis Photography"></a> </div>
Note: you insert this code just before the header closing </div> which is originally on line 154.
Let me comment the above:
1. We create a div class to be able to style and position the menu bar as a hole. (line 1 above)
2. We enter the html code for the URL we want to link to from the menu; NOTE: each link is associated with a different style class we create class=“sprite1”, class=“sprite2” and so on. These style classes will allow us to style each menu list item individually using the CSS style sheet. (lines 2–5)
3. We close the sprites class div we had previousely opened on line 1. (line 6)
You may just overwrite my links with yours as well as the titles, but leave the sprite1, 2, 3, 4 classes as is.
4. How to style your CSS Sprites Menu
You are almost done; we just need to add a few lines to our style sheet. From your WordPress theme or Child theme, edit style.css and add the following code:
.sprite1, a.sprite1 {
display:block;
width:256px;
height:236px;
background:url('http://photo.yorgoopress.com/wp-content/uploads/2011/08/photo-sprite.jpg') 0 0;
float:left;
}
a.sprite1:hover{
background-position:0px -239px;
}
.sprite2, a.sprite2 {
display:block;
width:256px;
height:236px;
background:url('http://photo.yorgoopress.com/wp-content/uploads/2011/08/photo-sprite.jpg') 257px 0;
float:left;
}
a.sprite2:hover{
background-position:257px -239px;
}
.sprite3, a.sprite3 {
display:block;
width:256px;
height:236px;
background:url('http://photo.yorgoopress.com/wp-content/uploads/2011/08/photo-sprite.jpg') 513px 0;
float:left;
}
a.sprite3:hover{
background-position:513px -239px;
}
.sprite4, a.sprite4 {
display:block;
width:256px;
height:236px;
background:url('http://photo.yorgoopress.com/wp-content/uploads/2011/08/photo-sprite.jpg') 769px 0;
float:left;
}
a.sprite4:hover{
background-position:769px -239px;
}
Replace my background image link with yours: upload your sprites to the Media Library from your WP Dashboard and grab the link from there.
You may now position your menu if needed or add a border by adding one more line as I did on mine:
.sprites {display:block;margin-top:30px;border-top:1px dotted #fdd89e;border-bottom: 1px dotted #fdd89e;padding:10px 0 10px 0; }
This is it.
If you encounter any problem or need help, just comment here below.
Incoming search terms:
- /create_topic php yabb
- free photoshop tutorials masking layering yabb administrator
- film strip psd
- sprite menu wordpress
- /forum_topic php?thread_id= yabb 2000–2003
- sprite wordpress menus
- css sprite templates
- free slidedeck skins
- sprite menu psd
- /data_north php?comment_id= yabb
Related posts:



[…] rest is here: CSS Sprites Menu for WordPress | Tutorials Share and […]
A super step by step tutorial, will definitely have to find time to try this one out. Many thanks.
Yeah, will be nice with O&C stuff!