Without seeing your gallery and the configuration options that your gallery uses, I cannot determine the cause of your problem but it sounds like your images may not be filling the gallery's image area (resulting in a space between the bottom of the image and the thumbnails). Whether or not the images fill the gallery's image area will depend on the aspect ratio of your images, the aspect ratio of the gallery's image area (which, if your gallery's dimensions are expressed as percentages, will depend on the aspect ratio of the user's browser window) and the value of the imageScaleMode configuration option.
If you use the following configuration options in your gallery, the bottom of the main image will always be touching the top of the thumbnails (with no space in between) no matter what all the different aspect ratios are. (Try resizing your browser window with a gallery using these settings.)
thumbsPosition="BELOW_IMAGE"
maxThumbRows="1"
maxThumbColumns="10"
imagePadding="0"
thumbPadding="0"
imageScaleMode="FILL"
If you do not want to use imageScaleMode="FILL", then perhaps you could fix your gallery's dimensions (using absolute pixel values rather than percentages) so that the aspect ratio of the gallery's image area closely matches that of your images. In doing so, the aspect ratio of the user's browser window (always an unknown quantity) will no longer be a factor in the equation.