P
P
Pashchuk Ilya2015-10-06 23:01:44
css
Pashchuk Ilya, 2015-10-06 23:01:44

How to set the border to 1.5 pixels?

Hello friends, here is the question I have for the forms is the style

input[type="text"],textarea{
  border:1px dashed #000;

In general, the question is, if we take the style, then a border of 1 pixel is small and 2 is a lot of how to set it to one and a half pixels border:1.5px dashed #000;???

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry Novikov, 2015-10-06
@dmitriy_novikov

In Photoshop, one and a half pixels would show up magnified as 1 pixel at 100% transparency and one pixel at 50% transparency. so you can do this:

input[type="text"],textarea{
border:1px dashed #000;
outline:1px dashed rgba(0,0,0,0.5);
}

well, or something like that.

Z
zooks, 2015-10-06
@zooks

Pixel is a unit of graphic information. If you don't like how the 2 pixel frame looks - change the color.

C
Curly Brace, 2015-10-06
@stasuss

I agree with the previous speaker. You can still blere or change the alpha.
but it's not worth working with subpixels at all. This is about positioning. not just pixel perfect so appreciated

Y
Yaroslav Vinnik, 2017-11-13
@Myrzik

I don’t know how correct and relevant this is, but if you do it with a radius, then everything turns out
border:1.5px dashed #000;
border-radius: 1px

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question