# When I used color in a cell of a take, then this cell become wider

When I used color in a cell of a take, then this cell become wider. How to solve it?

The code is here:

\documentclass{beamer}

\usepackage[utf8x]{inputenc}
\usepackage{default}

\mode<presentation> {
\usetheme{Warsaw}
\usecolortheme{crane}
}

\newcommand{\green}[1]{\begingroup\color{green}#1\endgroup}
\begin{document}
\begin{frame}

\begin{table}
\begin{tabular}{|p{2.5cm}|p{2.5cm}|p{3.5cm}|}
\hline
& CCCC &  UUUUU\\
\hline

\hline
AAAAAAAA &   itself &  \green{BBBBBBBBBBBBB}\\
\hline
AAAAAAAA &   itself &  BBBBBBBB\\
\hline
\end{tabular}
\end{table}
\end{frame}
\end{document}

-
This code doesn't work. It contains lots of errors starting with the 1 in newcommand. Beside this use \textcolor{green}{#1} or \leavevmode\color{green} –  Ulrike Fischer Jul 3 '14 at 8:42
strange, the code works for me. Thank you, I think your sugguestion works well. –  Ginger Jul 3 '14 at 8:51
Now it will probably work (apart from the fact that I don't have the "default" package. But before the edit it had some error. –  Ulrike Fischer Jul 3 '14 at 8:57

\newcommand{\green}[1]{\textcolor{green}{#1}}