Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for professional graphic designers and non-designers trying to do their own graphic design. It's 100% free, no registration required.

Here's what I have...

image

The top and bottom half are two separate objects each with their own gradient.

I would like to remove the curved horizontal line going across the shape, then I would like to add a gradient to the rounded rectangle stroke. I thought I had found an answer to the first part here(drag stroke below contents) which I applied here but in addition to being kind of a work around(the horizontal line still exists), I am still unable to add a gradient to the stroke. The rest of what I've googled regarding removing part of a stroke instructed use of the pen tool to add and then delete anchor points on the part of the stroke that I want removed but I am not clear on how to do this, whenever I tried, I ended up also removing the barrier between the two halves of the object which I do not want to do.

I have tried "Object > Path > Outline Stroke" multiple times in order to add a gradient to the stroke but am still left with the same two paths underneath the object's group. I expected the stroke to be turned into a new path. Any help as to how to

  1. Remove the horizontal line stroke from existence while still maintaining separate gradients for the top and bottom halves of the object

and

  1. Add a gradient to the stroke surrounding the rounded rectangle sans the horizontal line

would be greatly appreciated.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

In the Appearance Panel, click-drag the stroke below the Contents item will move the stroke behind the objects.

Then use Object > Expand Appearance, then Object > Expand - check ONLY the Stroke option and hit OK. You are then left with a shape rather than a stroke. This is expected. You can then apply a gradient fill to the resulting shape.

This method works. It can be a bit cumbersome because you're essentially creating new paths you need to manage.

However, Illustrator CS5 has no option to create gradients on strokes. So you can't really have a gradient stroke. You can only have gradient fills.

Regarding the path which crosses the shape. You can't remove that if you want the overlaying gradient. Many well-constructed Illustrator objects need closed paths. Since that specific path shapes the edge of the top gradient, you can't remove it. However, this should be of no consequence. You only see the path because the object is highlighted and Illustrator is highlighting the path edge. When you de-select the object you only see the edge of the gradient, not the path.

Here's possibly a better method....

Rather than using a stroke (since you want a gradient) use an offset fill.

  • Remove the stroke entirely.
  • Add a new Fill via the Appearance Panel and move the fill below the Contents item.
  • With the new fill highlighted in the Appearance Panel, choose Effect > path > Offset Path and enter a value (the width you want the stroke to appear to be)

You can then have a gradient around the exterior of the shape without the additional paths of expanded strokes.

fill

I used red/orange to show the offset fill a bit better.

Note: In Illustrator CS6 you can simply apply a gradient to a stroke. However, no other version of Illustrator supports that feature.

*screenshot from Illustrator CS6 but it should be the same as CS5 panels/dialogs.

share|improve this answer
    
Thank you! Object > Expand worked but using Offset path does work better as it allows me to have one consistent gradient. Thanks for the note about CS6 as well I had no idea, I'll have to upgrade soon. –  Ronald Dec 19 '12 at 1:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.