I love singing and am usually quite good at it but sometimes I find myself slipping from the key. Are there any exercises you can do to nail notes perfectly(or as close to perfect as one can get)?
Do you have an instrument? If so, you can play a single not, and sing it at the same time. You'll know when it's perfect, because the "beat" will be gone. If you don't, just download a few MIDI files and sing them like kareoke
for general singing technique including control of the pitch and "texture" of your voice, I recommend checking out the Seth Riggs method. There is at least one book, and CDs with exercises with scales etc. its an interesting method, seems to work well too
Can you hear yourself clearly? Even an opera diva will float off key if she can't hear herself. A monitor or studio cans can help immensely. I use studio cans to help me hear myself and to also dampen the volume (something that is critical if you perform with high volume - just ask Pete Townshend). If you float off key, then, to me, that means you can be on key. So that means you have a good ear. I don't know of any tricks or exercises that can help you stay on key, unless your vocal cords are just getting tired or strained. If that's the case, then a voice coach could be just the person you need to contact.
I used to have this happen to me all the time, then my voice teacher a few years ago had me start to do intrevals...play one note on a piano and then try to sing a perfect 4th above that (4 notes above), for example. try that with all different combos and notes. I was shocked by how well I could stay in tune and on key after I got fairly good at those.