Cut five pieces of wood for the various pieces of the floating nightstand — an 18-by-18-inch top, an 18-by-18-inch bottom, two 4-by-18-inch sides and a 4-by-18-inch back.
Paint the wood, giving the inside of the back a somewhat darker shade than the other pieces. Nail the five pieces together, forming an open-fronted box shape.
Search for any supporting wood studs behind the wall on which you're installing your floating nightstand, using a stud finder If a stud is conveniently placed, mark its location on the wall with pencil.
Drill pilot holes near the top of the inside back piece. Hold the nightstand against the wall, using a level to make sure it's straight. Mark the position of the pilot holes on the wall with a pencil, placing one hole over the stud previously marked, if any.
Drill holes at the position marked into the wall. Insert a wall anchor into any holes that aren't located over a stud and tap it in tightly with a hammer. Hold the nightstand in position once again and screw it in place.