I want something like this: (suppose the height of border is the same with div, I painted it longer just for clarification)
As you know, border is outside of div by default, also I can change it to inside of div. But now my question is about make it center of div (edge). How can I do that?
Edit: Also how can I set border upper (upon) div? Something like this:

