Issue
How can I apply a border to a div without occupying any extra space? The border must be inside the div.
Solution
You have 3 choices:
- Inner and outer boxes(as @xpapad stated).
- Using
outline, e.g.,outline:1px #000 solid;. Read more. - Using
box-sizing, which is a css3 property. E.g.,box-sizing:border-box;. Read more.
Answered By - Rufus
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.