I recently adjusted the width of an image (img tag) to be 1150px
* {
margin: 0;
padding: 0;
box-sizing: border-box;
user-select: none;
}
#background-image-myos {
border: 2px solid black;
border-radius: 5px;
width: 1150px;
}
Surprisingly, the clientHeight is now showing as 1146
alert("Height is " + document.getElementById("background-image-myos").clientHeight);
alert("Width is " + document.getElementById("background-image-myos").clientWidth);
What could be causing this discrepancy? Did I make a mistake somewhere?