I have the code:
\documentclass{article}
\usepackage[a4paper]{geometry}
\usepackage{tabularx}
\usepackage{lipsum}
\begin{document}
\begin{tabularx}{\textwidth}{ | X | c | }
\hline
\lipsum[1] & top\\
\hline
\lipsum[1] & center\\
\hline
\lipsum[1] & bottom\\
\hline
\end{tabularx}
\end{document}
Gives this:
The top row is already aligned top. How can I vertically align the center row at the center? And the bottom row at the bottom?
Best Answer
The vertical adjustment of the row "c" is related to the definition of the columntype X which uses the specifier
p
.You need
m
for a centered adjustment andb
for bottom. This can be achieved by\multicolumn
, whereby the line width must be saved (I don't know a good solution).Here is an example: