I’m updating my vanity light in the bathroom because it’s off center.

Where the center line is, there’s a wooden stud. I’ve bought one of the thin circular junction boxes, the ones usually meant for the ceiling fans.

Can I install this directly on top of a wooden stud? Is that against NEC code? I’m having a really hard time finding any decent information on this.

The wall is an interior wall so I was planning to screw some wooden panels onto the inside of the drywall to mount the junction box to.

  • Yeah, you can install it on top of a wood stud. It has screw hole in it right there, right? Given the obvious mounting affordance, I'm a little confused that you would ask the question. Is there a complicating detail? Does the box miss dead center, for instance? Do you want to punch your own mounting hole?
    – popham
    Commented Jan 9 at 23:40
  • Something like homedepot.com/p/… is your box, right? Maybe the opening for the wire lands on the stud?
    – popham
    Commented Jan 9 at 23:49

2 Answers 2


You can use a "pancake box" like this:

enter image description here
Image source: HomeDepot.com. No recommendation of brand or retailer implied or intended.

Or you can use a "saddle box" like this:

enter image description here

The pancake box

Is just fine if your vanity light has some sort of domed base (most do) that will give you the required cubic inches for the wiring connections. You simply run a couple of screws through any of the holes in the back of the box to attach it to the face of the stud. Make sure your screws aren't longer than about 1-1/4" just to be sure you don't accidentally drive a screw through the wiring that might be passing through a hole in the stud you're attaching it to. Usually, you'd want a 1/2" deep pancake box so that it matches the thickness of your drywall.

Make sure you either get a box like the one in the picture that include a cable clamp or buy a package of cable clamps to hold the cable tight in the box and to protect the outer insulation from being cut by the metal edge of the box.

The saddle box

Is appropriate if your light doesn't have a domed cover with enough room to make the wiring connections. The one in the picture has 16 cubic inches of space which should be plenty for 14/2 wiring and if the light is at the end of the line (i.e. no other light being controlled by the switch).

Of note, all the saddle boxes I've seen are plastic and come with tabs at the back that function as cable clamps. If you happen to find a metal one with knockouts, be sure to purchase and install an appropriate cable clamp.


A junction box for a light is a different than switch or receptacle boxes where if you pass by them sticking out you might break the plastic cover and other nasty things.

Wood studs can also be notched about 40% so the box can be further in, if you do not want the light fixture sticking out as much.

Using the side or the back of a junction box to screw into a stud does the same mounting use/requirement.

  • 3
    If it's a bearing wall, then the notch depth is 25% under IRC R602.6.
    – popham
    Commented Jan 9 at 23:29
  • 3
    There exist ceiling fan boxes with 1/2" thickness and some box volume squirreled away off to the side or both sides, e.g. supplyhouse.com/…, so if notching is necessary in the OP's case, then she should get a better box.
    – popham
    Commented Jan 9 at 23:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.