I purchased this intending to attach it to a metal bed frame.  It was about 2 inches too wide on each size and beyond a significant home depot project, there is no way to actually attach it to the bed.  It looks nice, however.  It is fairly sturdy just standing on the floor behind his bed.  The shelf is lower than anticipated as well, since we have a box spring and mattress.  It sits almost flush with the shelf.  Shelves are still functional for his bed time books and special toys.  All in all, a decent purchase for the price.