In this SO question, @Angel Politis offered a totally valid solution. However, he was wrong in saying that the OP's original idea is impossible.
I realize it is possible via box-sizing
and post my own answer.
1h 48m later, Angel edits his post in order to mention box-sizing
. He notes that it is "... not compatible with early versions of Internet Explorer, Safari, Firefox and Opera." This is actually incorrect based on the link that he himself included in his answer; according to that, it's compatible with everything besides IE 6 & 7.
My answer answers the OP's question more directly instead of offering an alternative like Angel did. Additionally, Angel's answer is actually compatible with less browser versions than mine. Based off of these two points, my answer is better for the OP.
However, Angel seems to be attempting to sweep my answer under the rug.
SO is about sharing information, not gaining reputation. Angel's actions seem to be born from an inverse moral, so I ask:
Is it okay for Angel to try to keep being the accepted answer like this, especially since the goal of SO is to get the OP the best answer (mine)?