Problem with vspace around table environment

I recently decided I wanted a caption for the top table, so I placed it in a table environment. When I did this, the \vspace*{-2.5cm} before the second table seemed to be ignored for some reason. Does anyone know why? How I can overcome this problem?

\begin{center}
\begin{table}
\caption{My Table}
\begin{tabular}
...
\end{tabular}
\end{table}
\end{center}

\newpage
\vspace*{-2.5cm}
\begin{center}
\begin{tabular}
...
\end{tabular}
\end{center}


If I remove the table environment then the \vspace*{-2.5cm} works again.

-
Never put a center environment around a table environment; instead, put \centering after \begin{table} – egreg Apr 24 '12 at 20:30
@egreg thanks, but can you explain why? Also, this seems to have centered the table vertically now. – Alex Apr 24 '12 at 20:34
The table environment defines a "floating object". Every LaTeX guide describes them. – egreg Apr 24 '12 at 20:36
@egreg I see. So the tabular environment is not a floating object and this is why the vspace no longer works? – Alex Apr 24 '12 at 20:39
– lockstep Apr 24 '12 at 20:42

If I understand your code correctly, you want to have the first part of some tabular material set on one page and the remaining tabular material at the very top of the next page. To force LaTeX to typeset the pending table float on the current page rather than defer it to some later point in the document that LaTeX's float-placement algorithm may deem to be appropriate, you should use \clearpage rather than \newpage, as \clearpage instructs LaTeX to "flush out" all pending floats (as well as start a new page). I take it that you've already ascertained that the first tabular enviroment -- the one that's currently encased in a table environment -- does fit on the intended page. You want to specify [htb!] as the placement directive for the table to give LaTeX maximum flexibility.
Or are you maybe looking to create a table that can span more than one page? If so, do check out the longtable, supertabular, and xtab environments. Unlike the standard LaTeX table environment, which can not cross page boundaries, these environments can all span multiple pages.
Addendum. As @egreg already suggested in a comment, don't use \begin{center} ... \end{center}; instead, use \centering after the \caption command and before the \begin{tabular}{...} command. The center environment inserts extra vertical whitespace, which is probably not what you want to achieve; the \centering macro centers everything in its scope but does not insert extra vertical whitespace.
Thanks for your reply. I've tried using \clearpage, but it seems to be inserting a blank page and the \vspace is still being ignored. – Alex Apr 24 '12 at 20:55
@Alex: Having a MWE would be helpful as there are many possibilities as to what may be going on. Regarding the matter of where the tabular material starts on the second page, have you tried \vspace*{-2.5cm} instead of \vspace{-2.5cm}? At least when I use the \vspace* instruction between \clearpage and \begin{tabular}..., LaTeX dutifully moves the tabular stuff up by the specified amount.- – Mico Apr 24 '12 at 21:07
Thank you for your help, it's fixed now. Adding \clearpage and then putting \vspace*{-2.5cm} after \begin{center} worked perfectly. If you look at my original code the \vspace*{-2.5cm} was before the \begin{center} which was not working. – Alex Apr 24 '12 at 21:15