2

I've created a dashed border-left to go around some content, but after testing it across browsers the spacing across each dash is inconsistent. I've done some searching but haven't been able to find a solution to this.

Chrome:

chrome result

Firefox:

firefox result

Styling:

.border {
border-left: 2px dashed black;
border-radius: 10%/200px
}
<div class="border"></div>
bateler8
  • 95
  • 6

1 Answers1

2

Probably you should look into other ways to achieve consistent border style. Check out this one https://kovart.github.io/dashed-border-generator/

Native CSS properties don't support the customization of border-style. Therefore, we use a trick with an SVG image inside background-image property. The SVG features give us the ability to change the distance between dashed lines, set custom pattern, add dash offset or even change a line cap. Generated SVG image is vector and it fills width and height of elements by 100%, so it doesn't matter what size elements have.

bazzas
  • 89
  • 3