5

I want to know how can I fix the border of this play button. It has 1px of border and 50% border-radius, and it looks ugly. 2px looks ok but I need 1.

enter image description here

Pietro Coelho
  • 1,894
  • 1
  • 26
  • 34

3 Answers3

5

Same questions solved here by Guy.

This is common when having a background and a border specified. The only way to fix this would be to have two separate elements, one with the background color and one with the border color with padding equal to the border-width.

See this article for a better explanation.

or try box-shadow: 0 0 1px 0px @yourBlueColor inset, 0 0 1px 0px @yourBlueColor;

Community
  • 1
  • 1
Jiri Sykora
  • 484
  • 4
  • 10
2

this problem is correlated to resolution dpi of your screen device , you can fix this with

border: 2px solid rgba(42, 91, 195, 0.35);

use 2px but use also a rgba transparent effect for reduce the size of border

themich
  • 193
  • 1
  • 3
  • 15
1

Not great, but looks quite a lot better by setting besides the border at 1px, an inset box-shadow with 1px blur-radius of the same color:

border: 1px solid #333;
box-shadow: inset 0 0 1px #333;