[Tex/LaTex] Centering Text in Table Vertically

spacingtablesvertical alignment

When I try to make a table I get a well spaced table but my text is only centered horizontally. Is there a way to center the text in the table vertically as well?

\begin{table*}[]
\renewcommand\arraystretch{1.5}
\centering
\caption{Table}
\label{my-label}
\resizebox{\textwidth}{!}{%
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
\textbf{c} & \textbf{c} & \textbf{c} & \textbf{c} & \textbf{c} & \textbf{c} & \textbf{c} \\ \hline
\textbf{c} & c & c & c & c & c & c \\ \hline
\end{tabular}
}
\end{table*}

Best Answer

I got what you wanted by removing the wrapper you used \resizebox{\textwidth}{!}{% } and leaving all the code you had inside that.

\documentclass{article}
\begin{document}
\begin{table*}[]
\renewcommand\arraystretch{1.5}
\centering
\caption{Table}
\label{my-label}
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
\textbf{c} & \textbf{c} & \textbf{c} & \textbf{c} & \textbf{c} & \textbf{c} & \textbf{c} \\ \hline
\textbf{c} & long word & arsodunarsodu & a sentence is here.& c & c & c \\ \hline
\end{tabular}
\end{table*}

\end{document}

related question:vertically align text in table in LaTeX enter image description here

Related Question