Learn to incorporate various design elements using Photoshop for web design, including creating a navbar, editing graphics, and manipulating opacity levels - all delivered in an easy-to-follow tutorial format.
This exercise is excerpted from Noble Desktop’s past web design training materials and is compatible with Photoshop updates through 2020. We now teach Figma as the primary tool for web and UX & UI design. To learn current skills in web design, check out our Figma Bootcamp and graphic design classes in NYC and live online.
Topics covered in this Photoshop for Web Design tutorial:
Creating a navbar, Adding a stroke, Changing opacity, Spacing Layers Evenly, Importing vector graphics from Adobe Illustrator, Editing a vector-based smart object in Illustrator, Editing a pixel-based smart object in Photoshop, Content-aware fill, Swapping out graphics
Exercise Preview
Exercise Overview
In this exercise, you will add some website navigation (a navbar) across the top of the page. You’ll also learn how to edit graphics placed as Smart Objects.
- In Photoshop, close any files you have open.
- Go to File > Open or hit Cmd–O (Mac) or Ctrl–O (Windows).
-
Navigate to Class Files > yourname-Photoshop for Web Class > NYC and double–click About Page - Ready for Navigation.psd.
This is a more developed version of the desktop design you’ve been working on in previous exercises.
Creating a Navbar Background
- Go to View > Fit on Screen so you can see the whole document.
- We want the navbar to be the width of the page. Let’s double-check the width of this artboard. In the Layers panel, select the Desktop artboard.
- In the Properties panel (Window > Properties), notice that the width (W) is 1280 px wide.
- We want the navbar we’re about to create to be put into the nav folder. In the Layers panel, select the nav folder.
- Expand the nav folder, so our new element will be created inside it
- In the Tools panel, select the Rectangle tool
.
- At the top left of the Options bar, make sure the menu is set to Shape. (It may currently say Path or Pixels.)
- Draw a rectangle over the top part of the cab photo, not worrying about the exact size or placement. We’ll set that specifically in the next step.
-
In the Properties panel set:
W: 1280 px H: 70 px (There’s nothing special about this value, we just think it looks good.) X: 0 (Distance from left of artboard.) Y: 0 (Distance from top of artboard.) - In the Layers panel, in the nav folder double–click the Rectangle 1 layer name and rename it: nav bg
- The shape is covering the text in the navbar, so let’s move it to the back. In the Layers panel, make sure the nav bg layer is selected.
- Choose Layer > Arrange > Send to Back.
- In the Layers panel, notice that the nav bg layer was sent to the bottom of the current folder (so it’s at the bottom of the nav folder below the other 3 text layers).
- We want the navbar to be the same color as the footer. Double–click the Layer thumbnail for nav bg.
-
With the Color Picker dialog open, click on the footer’s purple background.
This should set the color to #483a40
Click OK.
Adding a Stroke
- We want to add a white line below the navbar. In the Properties panel, click the Stroke icon
.
- In the color panel that opens, go into the Grayscale folder and click on White (the first swatch).
- Hit Return (Mac) or Enter (Windows) to close the color panel.
- Set the Stroke width (next to the Stroke icon) to 1 px.
- Select the Move tool
.
- The navbar now has a white stroke on all sides, but it’s kind of hard to see because Photoshop is also outlining the artboard. Luckily we can turn that outline off.
- Go to Photoshop > Preferences (Mac) or Edit > Preferences (Windows) and choose Interface.
- To the right of Artboards there are two menus. Change the second menu from Line to None.
- Click OK.
- Now you can clearly see the white stroke on all sides of the nav bg, but we only want it to appear on the bottom edge. No problem, we’ll just hide the other sides. Make sure nav bg is selected in the Layers panel.
- Hit the Up Arrow key once to hide the top edge.
- Hit the Left Arrow once to hide the left edge.
- To hide the right edge, we’ll make the navbar wider. Hit Cmd–T (Mac) or Ctrl–T (Windows) to transform.
- Drag the right resize handle to the right (beyond the edge of the canvas) so that the right side is hidden outside the canvas.
- Hit Return (Mac) or Enter (Windows) to apply the change.
-
Let’s zoom to accurate size:
- If you’re on a low-res display go to View > 100%.
- If you’re on a hi-res (Retina) display go to View > 200%.
Hold the Spacebar and drag on the image to scroll up to the top right of the page.
Layer Opacity vs. Fill Opacity
Anywhere you use a color in CSS, you can specify opacity (using RGBA). Photoshop offers a similar control.
-
Let’s reduce the opacity of the navbar so we can see some of the photo behind it. With nav bg still selected, at the top of the Layers panel reduce Opacity to 50%.
TIP: You can change the opacity by either typing in the number, or dragging left/right over the word Opacity to change the amount. Dragging on the Opacity label is nice when you want to experiment with the amount.
- Notice how this affected both the fill and the white stroke. We want the stroke to stand out to better delineate the content, so we only want to change the fill’s opacity. Put Opacity back to 100%.
- At the top of the Layers panel, set Fill (opacity) to 50%.
Notice the fill is now semitransparent, but the white stroke is still fully opaque.
Importing Illustrator Files
- If the guides are not visible, hit Cmd–; (Mac) or Ctrl–; (Windows) to show them.
- In the Layers panel, show the columns layer by clicking the box on the left where the eye
would be.
- In the Layers panel, in the nav layer group select the Resources layer so the new layer we about to create will go on top of it.
- We need to add the NYC logo. Go to File > Place Embedded.
- Navigate into Class Files > yourname-Photoshop for Web Class > NYC and double–click NYC Logo.ai.
- A dialog will appear. To accept the default options just click OK.
- The logo will appear in the middle of the screen. Double–click on it to accept its size.
- Drag the logo to the upper-left corner, aligning its left side with the second guide from the left (which borders the gray column highlight).
- Hit Cmd–; (Mac) or Ctrl–; (Windows) to hide the guides.
- In the Layers panel, hide the columns layer by clicking the eye
.
- In the Layers panel, make sure the NYC Logo layer is still selected.
- Hit Cmd–T (Mac) or Ctrl–T (Windows) to transform the logo.
- In the Options bar at the top of the screen, make sure the Link icon
has an outlined dark background (which indicates it’s checked).
-
Use the resize handles on the right of the logo to make it a bit smaller. It should end up looking similar to the example below:
- Use the Arrow keys to position as needed.
If you haven’t already, accept the transform by hitting Return (Mac) or Enter (Windows).
Spacing Layers Evenly
- At the top right of the page we’ve added text links for other pages in the site, but the spacing between them is not even.
- In the Layers panel, in the nav layer group select the Resources layer.
- Hold Shift and click on the Events layer so all 3 text layers are selected.
-
In the Options bar at the top of the screen, click the Distribute Horizontally icon
.
The spacing between the 3 pieces of text should now be equal.
Aligning Layers
Let’s vertically align the logo and nav links so they are vertically centered in the navbar background.
- We need to create a marquee selection for the area we want to vertically center within. In the Layers panel, in the nav folder hold Cmd (Mac) or Ctrl (Windows) and click on the layer thumbnail for nav bg to select the visible parts of this layer.
- In the document, you should now see a marquee selection around the navbar.
- In the Layers panel, in the nav folder select the NYC Logo layer.
- Hold Shift and click on the Events layer (so all 3 text layers and the logo are selected).
-
In the Options bar, click the Align vertical centers button
.
The logo and nav links should now be vertically centered in the navbar background!
Choose Select > Deselect to get rid of the marquee selection.
Editing Smart Objects
Notice that there is a street sign in the photo directly behind the NYC logo. It’s distracting and we should edit it out.
When we placed the image, Photoshop converted it into a Smart Object which contains the original photo embedded inside. In order to edit it, in the Layers panel find the cab layer and double–click on its Smart Object thumbnail (on the left side).
If a warning pops up telling you to save after editing, click OK.
The original photo will open. Zoom in on the street sign at the top left of the photo.
Choose the Lasso tool
.
-
Draw an outline around the sign similar to the following:
Go to Edit > Fill.
From the Contents menu choose Content-Aware and click OK.
Choose Select > Deselect to see the result better. Like magic, Photoshop made the sign disappear! If it did not do a perfect job, select the bad area and repeat the content-aware fill.
Do a File > Save. (It gets saved back into the original design we’re working on.)
Close the file.
You should be back in the main layout file. Check it out, the sign is now gone!
Swapping Out the Logo with a Different Version
We’re thinking the logo might look better if it were white rather than colorful. In the Layers panel, select the NYC Logo layer.
Go to Layer > Smart Objects > Replace Contents.
Navigate into Class Files > yourname-Photoshop for Web Class > NYC and double–click NYC Logo White.ai.
-
In the dialog that appears, click OK to accept the default options.
You should see the color logo has been replaced by the white logo. Cool!
Editing the Logo in Illustrator
This section requires Adobe Illustrator. If you don’t have Illustrator, skip this and continue with the next section.
Let’s see another way to change the logo. What if you didn’t have a white version and wanted to change the colored logo to white yourself? You’ll learn that here.
Go to Edit > Undo Replace Contents. You should once again see the color NYC logo.
In the Layers panel, double–click the NYC Logo layer’s Smart Object thumbnail.
If you get an alert about what to do after editing, click OK.
Adobe Illustrator should launch. If you get a PDF Modification warning, check Discard changes… and click OK.
If the Color panel isn’t showing on the right, go to Window > Color.
Choose the Selection tool
.
Click once on the logo. It’s grouped, so the whole thing will become selected.
-
At the top left of the Color panel, select the Fill icon if it isn’t already activated:
-
At the bottom left of the Color panel, click on the White swatch, as shown below. (If you don’t see the swatch, you can set all RGB values to 255.)
- Go to File > Save.
- Close the file.
- Return to Photoshop. You should see the updated white logo in your file!
- Go to View > Fit on Screen so you can admire the whole layout. The layout is really shaping up!
Save the file by hitting Cmd–S (Mac) or Ctrl–S (Windows).