# Table within table fouls up vertical alignment of neighboring cells!

I nested a table inside of my table like this:

\begin{tabular}{p{1in}||p{5in}}
\hline
This should be on top. & \begin{tabular}{@{\extracolsep{\fill}}lr}
Thing1 & Thing2 \\
Thing3 & Thing4 \\
Thing5 & Thing6 \\
Thing7 & Thing8 \\
\end{tabular} \\
\hline
\end{tabular}


and it looks like this:

but since This should be on top is in a p cell, shouldn't it stay up on top? How can it be made to look like this? :

• Why don't you put that cell in a minipage with the [t] placement option? Aug 23 '13 at 14:44
• The posted answer gives the answer, to see why: the two cells are p columns so align on the baseline of their top row. In the first cell their are two boxes from the linebroken paragraph so the baseline of the first is taken, the second cell just has a single line paragraph consisting of the nested table so the beaseline of the table is taken, which is its centre as [c] is default, so the top line of the left aligns with the centre of the table. If you use [t] the baseline of the table is that of its top row. Aug 23 '13 at 15:28
• @YuppieNetworking a minipage[t] would not change anything (that is essentially the same as a tabular p column that is already being used). Aug 23 '13 at 15:29
• @DavidCarlisle, ok thank you for the clarification, I knew that the p resulted in a minipage but I wasn't sure if it was already with the [t] placement. Aug 23 '13 at 15:53

## 1 Answer

Try

\begin{tabular}{p{1in}||p{5in}}
\hline
This should be on top. & \begin{tabular}[t]{@{\extracolsep{\fill}}lr}
Thing1 & Thing2 \\
Thing3 & Thing4 \\
Thing5 & Thing6 \\
Thing7 & Thing8 \\
\end{tabular} \\
\hline
\end{tabular}


Note the extra [t] in there.