How to Create a Diagonal Line Pattern
Here I'm going to show you all how to make a diagonal line pattern.
- Open up photoshop and create a new document.
Make the image size 4px by 4px. I titled mine Gray Line Pattern, but there's really no need to.
- You should now have something that looks like this:

- Zoom in really close so you can see the individual pixels in large. I zoomed to about 3200%.

- Use the PENCIL Tool
(Shortcut key: B; If the B shortcut key selects your BRUSH tool, then push SHIFT + B). Alternately, to select the pencil tool with the mouse, click and hold on the brush tool icon, until more icons fold out and select the pencil tool. Now, set the brush size to 1px

- With the mouse, fill in the pixels to form a line diagonally across the image:

Now you're done! You can save the image as PNG, GIF, or JPEG and use it on your web page as a background! —OR— Continue on and use it on another image by Defining a pattern.
- Click Edit → Define Pattern to create a photoshop pattern from the image we've created.

Then name the pattern, I named mine Gray line pattern:

- Then make a new image, or open the image you want to apply the pattern to and create a new layer.
For this example, I created a new image about 100px by 100px.
- Now FILL the image (or layer, if you chose to use an existing image). To FILL select Edit → Fill (Shortcut: SHIFT + F5) from the menu.

You can see here I had another pattern I did in black previously. Usually people will use black or white for their line color,
and then adjust the layer opacity for a scanline effect.
- Here's my plain white background sample, using the gray pattern:
