# Table cell centering

I'm learning to use LaTeX with Overleaf and I cannot solve this problem.

I want to center both vertically and horizontally the first row, while increasing the space between lines and adding enumerate. Everything I try doesn´t work.

This is the code:

\begin{table}
\begin{center}
\setlength{\tabcolsep}{10pt} % Default value: 6pt
\renewcommand{\arraystretch}{1.5} % Default value: 1
\begin{tabular}{p{8cm}}
\toprule
\centerline{\textbf{Titleeeeeeeeeee}}  \\
\hline
\begin{enumerate}
\item aaaaaaaaaaaa
\item bbbbbbbbbbbbbbbb
\item cccccccccccccccccccccc
\item ddddddddd
\item eeeeeeeeeeeeeeeeeeeeeeeeeeeeee
\end{enumerate}\\
\toprule
\end{tabular}
\caption{\label{tab:xxxxx} xxxxxxxxxxxxxxxxxxxxxxxx}
\end{center}
\end{table}


And this is the result,

• Welcome to TeX.SX! Please help us (and also you) and add a minimal working example (MWE), that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass and ending with \end{document}. Jun 27 '18 at 10:05
• Jun 27 '18 at 11:21
• Why do you use \toprule for the line at the bottom of the table instead og \bottomrule? Regarding the centered alignment in the first row, you might want to use \multicolumn or \makecell instead of \centerline. Jun 27 '18 at 12:43

That-a-way? Note you shouldn't use the centerenvironment within table, as it adds unwanted vertical spacing. Use the \centering directive instead. The makecell package allows for line breaks in standard cells and a common formatting for cells introduced by \makecell or \thead. Last, you can define ‘cell gapes’ which are vertical spacing added at the top and bottom of cells with the \makegapedcells command.

\documentclass{article}
\usepackage{makecell, booktabs}
\usepackage{enumitem}
\makeatletter
\newcommand*{\compress}{\@minipagetrue}
\makeatother

\begin{document}

\begin{table}
\centering
\setlength{\tabcolsep}{10pt} % Default value: 6pt
\setcellgapes{10pt}\makegapedcells
\begin{tabular}{>{\compress}p{8cm}}
\toprule
\midrule
\begin{enumerate}[after=\vspace*{-\dimexpr\baselineskip + \partopsep}, wide=0pt, leftmargin=*]
\item aaaaaaaaaaaa
\item bbbbbbbbbbbbbbbb
\item cccccccccccccccccccccc
\item ddddddddd
\item eeeeeeeeeeeeeeeeeeeeeeeeeeeeee
\end{enumerate}\\
\bottomrule
\end{tabular}
\caption{\label{tab:xxxxx} xxxxxxxxxxxxxxxxxxxxxxxx}
\end{table}

\end{document}