html tutorial - How to place border inside of a div element using CSS - html5 - html code - html form
Answer: Use the CSS box-shadow Property
If you want to place or draw borders within a rectangular box there is a very easy solution — just use the outline property instead of border and move it inside of the element's box using the CSS3 outline-offset property with a negative value.
However, this solution will not work for rounded corner elements.Draw border within a circular box or element with rounded corner using the box-shadow property.