Recessed light trim will not stay tight to ceiling

I have installed small recessed lights in a house that i have renovated. These recessed lights have trim that simply staps into place. The bulb is also supported by this trim (slides into tension fork kind of thing). For one reason or another the can for some of these fixtures is too high in the ceiling and will not allow the trim ring to snap into place. In addition a few of the fixtures have slight movement in them (20" o.c. joist in a house built in 1890) which does not allow me to apply enough force to get the ring to go in the fixture for enough for the clips to snap past the ring on the top of the trim. Can i glue these rings into place? How would i then clamp or support the trim long enough for the glue or caulk etc. to set up? Please help me with this so that my project can look complete.

Glue is not a good idea. You need to be able to remove them later if you need to.

If they are a good light then you are doing something wrong. I would reread the instructions and figure it out. If you bought them at a lighting store and not a cheap box store then go back and ask them how they work. If you bought them at a box store good luck, they might just be junk. Most can lights are usable though once you figure them out. They do need to be a nice tight hole and just the right depth. It should be close to flush with the finished ceiling. There are a lot of different ones with different ways of installing them and even different applications.

Get the installation directions for the lights and see how they should have been adjusted to put them at the correct depth and see if the adjustments can be made after installation. As far as the loose ones are concerned, can you glue the canister in place rather than the rings.

Your depth is off and the can needs to be recessed slightly. This will help the trim to fit snug against the finished surface. The unit needs to be secured in place too. Some of the fixtures have a wing nut that you can use to raise or lower the can once in place.