In WebKit driven browsers, e.g. Safari, Chrome, borders with their style declared as dotted
are rendered with square dots instead of round.
Is there any way to force rendering of round dots seamlessly across browsers?
IF you're only targeting modern browsers, AND you can have your border on a separate element from your content, then you can use the CSS scale transform to get a larger dot or dash: border: 1px dashed black; border-radius: 10px; -webkit-transform: scale(8); transform: scale(8);
To set the dotted line for the border, use the border-style property.
A natively supported solution is currently lacking, as the specification does not define these properties explicitly, and leaves it for the browser's implementation.
You may, however, use SVG to create the border, as it offers full control over the characteristics you're after.
Draw a line, than define its stroke-dasharray
and stroke-linecap
attributes to achieve the desired effect.
<line
x1="40" x2="260"
y1="100" y2="100"
stroke="#5184AF"
stroke-width="20"
stroke-linecap="round"
stroke-dasharray=".001, 30" />
stroke-dasharray
stroke-linecap
I also had this problem but I only needed three round dots under my menu item. So I just used a terrible hack, but it worked: First of all I hooked in FontAwesome using @import Then added the round dot characters as content in the CSS:
#nav ul .current_page_item a:after {
font-family: 'FontAwesome';
content: "\f111 \f111 \f111";
font-size: 6px;
display: block;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With