CSS border width shrink / Prevent border size change

How can I prevent shrinking of border width in some web browsers using CSS ?

I am using CSS height, line-height and border-width.The result looks good in some web browsers, but in other browsers, the border is shrinked from 3px to 2px.
0
give a positive ratinggive a negative rating
Hi,

To prevent the border-width shrink, you can add box-sizing property:

width: 300px;
height: 100px;
border: solid #CCCCCC;
border-width: 0px 0px 3px 0px;
box-sizing: border-box;




Share on FacebookShare on TwitterShare on LinkedInSend email
1 answer
x
x
2024 AnswerTabsTermsContact us