I want to make a table with vertically centered columns in a \tabularx environment. How can I code the table to have all the column types (l, c, X) vertically centered?
Here is my code:
\begin{table}[h]
\centering
\caption[Text]{Text.}
\label{tab:5599}
\begin{tabularx}{\textwidth}{|l|c|X|}
\hline
\textit{} & \textit{A} & \textit{B} \\
\thickhline
A & B & C
\hline
\end{tabularx}
\end{table}
EDIT:
I am still facing the problem that my text is not vertically centered:
\begin{table}[h]
\centering
\caption[Material for SDS-PAGE]{Buffer compositions for SDS-PAGE.}
\label{tab:8899}
\begin{tabularx}{\textwidth}{Xcccc} % way of defining a fix columns width
\toprule[1.5pt]
\textit{} & \textit{Resolving gel} & \textit{Stacking gel} & \textit{Laemmli sample buffer} & \textit{Running buffer} \\
\midrule[1.5pt]
Acrylamide & 10 \% & 5 \% & - & - \\
\midrule
Tris-HCl (1.5 M, pH 8.8) & 25 \% & - & - & - \\
\midrule
Tris-HCl (1.0 M, pH 6.8) & - & 12.5 \% & 6.25 \% & - \\
\midrule
SDS & 0.1 \% & 0.1 \% & - & - \\
\midrule
Ammonium persulfate & 0.1 \% & 0.1 \% & - & - \\
\midrule
TEMED & 0.04 \% & 0.1 \% & - & - \\
\midrule
2-Mercaptoethanol & - & - & 0.1 \% & - \\
\midrule
Bromophenol blue & - & - & 0.0005 \% & - \\
\midrule
Glycerol & - & - & 10 \% & - \\
\midrule
TRIS & - & - & - & 0.25 M \\
\midrule
Glycine & - & - & - & 1.92 M \\
\midrule
pH & - & - & - & 8.3 \\
\midrule
H\textsubscript{2}O & Solvent & Solvent & Solvent & Solvent \\
\bottomrule[1.5pt]
\end{tabularx}
\end{table}
Here is the output:






\thicklineand there seems to be a \ missing afterC. – LaRiFaRi Dec 08 '16 at 12:55