I set a border style of a div element in html as border: 1px solid black;
. It shows correctly in most cases. But I just found a weird one, which is Chrome on Win 7 Home Premium, that the computed style shows the border width is 1.11111111px instead of 1px. Could someone tell me any possible reason that makes this happen?
i am not sure and just have couple guesses:
Is that possible your style is overwritten by other style in the same css file?
Is your browser in 100% zoom? I don't think this will bother but I suggest you check it
@chaonextdoor Did you use 'reset.css' in your project? Because most of the time if we do not specify any styles for any element, them browser uses its default settings on those places.
Quick question: Is there a specific reason your border has to be exactly 1px.
Also, as everyone else is saying, try to set your browser and your computer zoom at the default 100% zoom.
And the code: border: 1px solid black;
is correct
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