Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Web graphics often have a thin border that constrasts with their main color (e.g. a white border for a black graphic) so that they remain visible when placed over a background that shares their fill color (e.g. when placed over a random image on a web page, where you're not sure what color will lie beneath the graphic).

I've been making such borders by duplicating my graphic, setting the duplicates fill to none, stroke to 3 pt white, and placing the duplicate directly behind the original, so that the stroke is visible only on the outer edge, while the original graphic hides the inner edge. Is there a better way?

The stroke panel is not the answer I'm looking for because it doesn't work with compound paths. If I have a circle with a semi-transparent heart cut out of it, using outside stroke will put the stroke both on the outside edge of the circle and around the edge of the heart, which I don't want.

share|improve this question

migrated from Oct 21 '11 at 21:59

This question came from our site for Graphic Design professionals, students, and enthusiasts.

The answer you're looking for is in the Stroke Panel UI. Look for three little squares, hover for a tool tip. This really isn't an appropriate question for this site (see the FAQ). – Alan Gilbertson Oct 20 '11 at 19:45
@AlanGilbertson thanks for your help. is there a better place to ask this kind of thing? I do not see an obvious candidate from the other stackExchange sites. – jela Oct 20 '11 at 20:08
@AlanGilbertson also I'm afraid that technique doesn't work for compound paths, eg a heart cut out of a circle. in this case stroking the outside of the path will create a white border both on the outside shape and surrounding the heart shape inside it. if the latter is semi-transparent, it is necessary to use a compound shape and also important that the cut out does not have such a border. – jela Oct 20 '11 at 20:33
I find it odd that this was migrated from Graphic Design SE. I don't use that site, but I checked out their FAQ and this seems no less on-topic there than it does here. On the other hand, one of their mods was the migrator, so.... – Pops Oct 21 '11 at 22:25
Could you define "better"? That is, do you want a technique that you can do in fewer steps? One that works more quickly? Uses less memory? – Pops Oct 21 '11 at 22:29

I don't know of a better way, and it seems to me like your method would work fine for the case of the circle with a semi-transparent heart cut out of it. Just remove the heart shape from the duplicate after you create it so when you apply the thick white stroke it will only apply to what's left...namely the edge of the enclosing circle.

Below is an example of doing that. Note there's with no white edge around the semi-transparent heart cut-out although through grouping they're all treated as a single graphic entity by the program:

circle with semi-transparent heart cut out with white no edge around the heart

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .