We investigate quantum and temperature fluctuations of a vortex lattice in a one-dimensional optical lattice. We discuss in particular the Bloch bands of the Tkachenko modes and calculate the correlation function of the vortex positions along the direction of the optical lattice. Because of the small number of particles in the pancake Bose-Einstein condensates at every site of the optical lattice, finite-size effects become very important. Moreover, the fluctuations in the vortex positions are inhomogeneous due to the inhomogeneous density. As a result, the melting of the lattice occurs from the outside inwards. However, tunneling between neighboring pancakes substantially reduces the inhomogeneity as well as the size of the fluctuations. On the other hand, nonzero temperatures increase the size of the fluctuations dramatically. We calculate the crossover temperature from quantum melting to classical melting. We also investigate melting in the presence of a quartic radial potential, where a liquid can form in the center instead of at the outer edge of the pancake Bose-Einstein condensates.