Skip to main content
Inspiring
August 6, 2025
Answered

add a stroke to one side of a rectangle

  • August 6, 2025
  • 3 replies
  • 287 views

Hey,

I want to know if there is a trick to add a stroke to one side of a rectangle.

As I know Illustrator does apply the stroke on the 4 sides auto.

 

 

Correct answer Jacob Bugge

H Gu,

 

You can also set the Stroke as desired, then Align Stroke to Inside, and then tick Dashed Line and use the right combination of Dashes and Gaps based on the exact side lengths.

 

Click to get (a wee bit) closer

 

3 replies

Jacob Bugge
Community Expert
Jacob BuggeCommunity ExpertCorrect answer
Community Expert
August 6, 2025

H Gu,

 

You can also set the Stroke as desired, then Align Stroke to Inside, and then tick Dashed Line and use the right combination of Dashes and Gaps based on the exact side lengths.

 

Click to get (a wee bit) closer

 

Ton Frederiks
Community Expert
Community Expert
August 6, 2025

It is easier just to draw a single line. But you can try this more complicated way

Scott Falkner
Community Expert
Community Expert
August 6, 2025

No. The stroke cannot be treated as separate segments. You can use the Direct Select tool (white arrow) to select one side, copy, then paste in place or Paste in Front. This will create a new object which can have its own stroke.

 

 

H_GuAuthor
Inspiring
August 6, 2025

I've found a better way using the Free Distort effect on the stroke