Only after trial and error and many poorly-installed electrical boxes can I offer up some quick steps for success for installing nail-in, new construction electrical boxes.
Begin:First, mark off your on-center point where you will be installing the box. Here I have marked off both 48" and 46" high, due to some dimensional issues that haven't yet been solved. Later on, you'll see that I decide to put the box at 46".
But isn't this heresy? How can I decide at which height to place the box? Doesn't electrical code dictate everything?
Interestingly enough, the height of a light switch (which is what this box will function as) is not set in stone. Electrical code does not regulate this. Convention is to place them at 48" high, but they can go up to 53" high.