I want a table whose first column is aligned top, second column is aligned middle, and third column is aligned bottom; like this:
I wrote the following code:
\documentclass{article}
\usepackage[english]{babel}
\usepackage{array}
\begin{document}
\begin{tabular}{| p{1cm} | m{1cm} | b{1cm} |}
\hline
x &
A long text comes here &
x \\
\hline
\end{tabular}
\end{document}
Yet, to my surprise, the outcome was "all columns aligned middle," as follows:
What did I do wrong?
Best Answer
You could use optional arguments of
\parbox
for vertical alignment and vertical size. Here's a small demonstration example, I just quickly estimated the height. Inserting\vspace{0pt}
is a trick for changing the base line for the alignment. Without it, we would get a lot of additional whitespace.Output: