# Position of \only within a \tabular

I have the following code:

\documentclass{beamer}
\usepackage[frenchb]{babel}

\begin{document}

\begin{frame}
\begin{tabular}{ll|ll}
\only<1>{only 1}
\only<2>{only 2}
\end{tabular}
\end{frame}


It compiles, but curiously the position changes slightly between 2 slides. Does anyone know how to keep the same position while using \only?

-

Suppress the spurious blank space after \only<1>{only 1}:

\documentclass{beamer}
\usepackage[frenchb]{babel}

\begin{document}

\begin{frame}
\begin{tabular}{ll|ll}
\only<1>{only 1}%
\only<2>{only 2}
\end{tabular}
\end{frame}

\end{document}

-