How can I create a dashed line with a different fill and stroke colour?

I have a white dash line on my map "former range" which doesn't show up in the legend, which has a white background. I want to keep them both white. The only way to make the line show in the legend is to assign a darker stroke colour to border the dashes.

I've tried various formatting options, e.g. converting the lines to arrows and setting the heads at size 0 but I can only make the stroke dashed, not the fill. I've also tried with the layer as a line and a polygon.

  • 2
    If you add a new line behind your line and make it thicker if will work as a stroke for the old line.
    – Jakob
    May 28, 2019 at 6:39

1 Answer 1


Since most maps have a white background, having a white line on said map is... unusual. From a cartographic POV you should change that lines colour.

As to your problem: Go to the layers symbology, change the lines dashing to custom (lower red box in the image) and set e.g. 4 mm by 4 mm. Copy that symbology (upper red box), make it about double as wide as your white dashed line, make it e.g. black and make sure it is not on top of your white line.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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