# Centering is not working

The below piece of code is not getting center aligned. Kindly help in finding out the solution for the same

\begin{table}[!ht]
\begin{tabular}{|c||c|c|c|c|c|} \hline
\centering
AE mode & 512 Byte & 1KB  & 1 MB & 1 GB & 2048 PetaBytes ($2^{64}$) \\ \hline \hline
%IACBC & BC & & & m + 2 & n & n & n & 2 independent random keys are required  \\ \hline
\end{tabular}
}
\end{table}

-
You want to center the tabular itself. Then you should put \centering outside that environment (but still inside table environment). By the way, don't you have an extra }? – Manuel Jan 22 '14 at 20:48
Welcome to TeX.SX! In the future, please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That way, it'll be much easier for other users to see your problem. – Herr K. Jan 22 '14 at 23:19
@Manuel You should make than an answer – Andrew Swann Apr 9 '14 at 18:39

You want to center the tabular itself. Then you should put \centering outside that environment (but still inside table environment). By the way, you have an extra }.

\begin{table}[!ht]
\centering
\begin{tabular}{|c||c|c|c|c|c|}
\hline
AE mode & 512 Byte & 1KB  & 1 MB & 1 GB & 2048 PetaBytes ($2^{64}$) \\
\hline
\hline
%IACBC & BC & & & m + 2 & n & n & n & 2 independent random keys are required  \\
\hline
\end{tabular}
\end{table}

-