I need to create a rectangle that has a 1px stroke. It needs to have one color on the top left and another on the bottom right with a diagonal line running from the bottom left to the top right. I also need to add some text to the right of it and would like it to be vertically-centered with the rectangle.

Will someone please tell me the steps to do this?

  1. Select your rectangle tool. Draw a rectangle. (ooh! easy.)
  2. Window → Stroke and make sure it says "1 pt."
  3. Window → Gradient
  4. Click on the big white example box in the Gradient window. In CS5 this fills in with a white-to-black linear gradient.
  5. Window → Swatches or Color
  6. Drag your colors onto the left and right arrows either on the rectangle or in the Gradient window to set the colors of your gradient.
  7. Click on the Gradient window to select it. (that is, to make sure Color or something else isn't active) Then click and drag on your rectangle for your diagonal. Repeat until you like it.
  8. Select your text tool. Type. (ooh! easy.)
  9. Select the type AND the rectangle.
  10. Window → Align
  11. Click on the Vertical Align Center button. Futz as needed so it looks right.
  12. Tada!
  • Also, when I select the type and the rectangle, then click vertical align. It doesn't actually vertically align them properly. Look at the screenshot (img.skitch.com/20111114-xnxmrbeyc3f62egnbidjepp6nd.png) and note how there's more space down the bottom. – Cofey Nov 14 '11 at 21:44
  • Thanks for the help! I followed your steps and have run into three issues. 1. I need a diagonal stroke to appear in the middle of the two colors. 2. I would like the points of the diagonal line to be even with the points of the rectangle corners (it's off a bit). 3. There's still a small gradient between the two colors. I would like it to be a solid line between the black/yellow. Can you tell me how to fix? See the following screenshot: img.skitch.com/20111114-kkbhtmr2sabmi5unqrfe2ptgty.png – Cofey Nov 14 '11 at 22:17
  • I didn't realize you meant "a rectangle made of two triangles" rather than "a gradient." The easiest way to do that is to use the Scissors tool. Click and hold on the Eraser, and the Scissors comes up. Click on the UR and LL points of your rectangle. That gives you two Ls. Connect the end points of the Ls and make two triangles. Color (solid) as needed. – Lauren Ipsum Nov 15 '11 at 1:19
  • For the type, either futz it by eye (drop a guide in the middle of the rectangle and eyeball the type) or turn the type into outlines and Align again. – Lauren Ipsum Nov 15 '11 at 1:20
  • Thanks again! So here is where I am now: img.skitch.com/20111115-1q31dftpitau5pyxs5fthf27mn.png. How do I add the stroke between the two colors and how do I fill in the two edges so it's a complete rectangle? Also, why doesn't the line divide it in half an even 50/50%? (I clicked on the two anchors at the very corner with the Scissors tool.) – Cofey Nov 15 '11 at 4:55

Your Answer

