I would like to create a border only on one side of a rectangle. That border would have that modern zigzag stroke that is present on so many websites. Just like on this photo :
I've tried creating a triangle and adding it as a brush (pattern brush to be more precise). However, it didn't work out well because the triangles were not aligned to the outside of the rectangle. Also they were surrounding the rectangle on every side instead of just one.
Is there a good and quick tutorial out there on internet that would explain how such zigzag borders are created ?
Make a line about the length of the ZigZag size you need(use the line tool or pen tool). Make sure to put a color on the Stroke or Fill of the line before the next step.
Go to Effect > Distort & Transform > ZigZag
Click the preview checkbox and adjust the Size and Ridges per Segment sliders until satisfied.
Once you've hit OK you'll have your zigzag. Next you need to go to Object > Expand or Expand Appearance. This turns it into a path as opposed to an Effect on a Path.
Now all you need to do is make a rectangle and fit it to the zigzag path. I'd combine the 2 shapes with Windows > Pathfinder (If pathfinder is checked it's already open) and hit the first icon which is "Unite".
It'll probably be helpful to have the Smart Guides on when fitting the Rect to the ZigZag.