To attach the legs to the tabletop I made a rectangular box out of 1×4. I wanted a lip under my tabletop of (about) 1-3/4″, so I cut 2 long side pieces at 45″ and 2 end pieces at 15-1/2″. I tacked this box together with the brad nailer, and then, using a straightedge, I scribed a line on the underside of the tabletop, 1-1/2″ from each edge. This is one of the beauties of starting with a factory-squared top.
TIP: Pneumatic brad nailers, with fine wire brads, are handy for tacking things into place or stitching multiple pieces together when you don’t have a second pair of hands.
Adding glue to the inside of that line, I pressed the rectangle into place, squeezing out the excess glue. Then I grabbed 4 of those scrap pieces I made earlier and screwed them to the underside of the table as temporary mounting blocks to hold the rectangle in place. I added 4 (also temporary) screws to hold the rectangular box to the mounting blocks and the top.
TIP: Torx or Star-Drive self-tapping, general-purpose wood screws will spare you the frustration of using Phillips-head screws that tend to “cam out” or strip during hasty projects.
Then I flipped it over and stitched down the top with sturdy, countersunk, screws. (There are, of course, ways to do this without screwing smack through the top surface of the table if that bothers you. You can buy special hardware for mounting the top from underneath. You can even leave the mounting blocks in place.)
Finally, I flipped it back over to remove the temporary screws and mounting blocks, and I wiped up the extra glue with a damp rag.