You can turn the outline of an element to the _inside_ by setting the outline-offset property to a negative value. (Not supported in IE) posted on 14.02.2019