Because I have an open staircase I use a xpen. I got this one which is so nice
Expandable Pet Pen Medium w/Floor Tray , as you can also get a top for it for the yorkies that can climb well :-) Gizmo got the top lol, I only put it on when he is home alone. It's also really nice because it has a tray underneath it that protects my wood floors :-)