Definately a depth of field problem.
Liz what lense did you say you had with it and what settings did you have the camera set on???
If you used the macro setting on the camera (the flower shape) then it does not allow you to control the F stop as Scott has mentioned and so investing in a macro lense is the best option.
Set the camera to Arperture priority (the big letter A on the left hand dial) that way the camera will set shutter speed etc and you set the F stop. Minimum focle distance will probably be about 22cm so make sure you are at least this distance away from the subject and to keep it simple the greater the number of the F stop the more of the subject behind and in front of the focle point will be in focus so setting it at f16 will give you a greater depth of field than you would get if you set it at f3.2 have a good play with this setting it will help a lot if you take the same picture with different F stops and you will see what we mean
Edit: Another thought, as I am using a D80 I am not sure if you have this button or not but when you look at the front of your camera (the lense pointing at you) just below the lense on the left hand side do you have a button???
If you do when you have everything set up and all the setting put into the camera just before you take the photo if you press this button whilst looking through the view finder it will show you what will be in facus and what will not (its called the depth of field preview button)
