6

I've two table placed next to each other as mentioned HERE

Brief copy of code is mentioned below:

\parbox{.2\textwidth}{
\begin{tabular}{|c|c|c|c|c|}
\hline
$\textbf{Q\#}$&$ \textbf{Skills}$&$ \textbf{Your}$&$ \textbf{Correct}$&$ \textbf{\%of Stu.}$\\
$ $&$ \textbf{Tested}$&$ \textbf{Answer}$&$ \textbf{Answer}$&$ \textbf{answered}$\\
$ $&$ $&$ $&$ $&$ \textbf{correctly}$\\
\hline
1&1&1&1&1\\
\hline
11&11&11&11&11\\
\hline
111&111&111&111&111\\
\hline
\end{tabular}}
\quad
\parbox{.2\textwidth}{
\begin{tabular}{|c|c|c|c|c|}
\hline
$\textbf{Q\#}$&$ \textbf{Skills}$&$ \textbf{Your}$&$ \textbf{Correct}$&$ \textbf{\%of Stu.}$\\
$ $&$ \textbf{Tested}$&$ \textbf{Answer}$&$ \textbf{Answer}$&$ \textbf{answered}$\\
$ $&$ $&$ $&$ $&$ \textbf{correctly}$\\
\hline
38&38&38&38&38\\
\hline
39&39&39&39&39\\
\hline
\end{tabular}}

Here tables are coming next to each other with vertical alignment = middle. It need to corrected as vertical alignment = top. Image Here Can you please suggest option for same?

Pawan Mude
  • 2,921
  • 1
    Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Sep 20 '14 at 15:53

2 Answers2

8

One possible solution: wrap a tabular environment around the two particular tables and use the optional [t] alignment parameter of \begin{tabular}.

By the way: The tables are too large, but I did not address this issue!

enter image description here

\documentclass[10pt]{book}


\begin{document}%
\small
\begin{tabular}{cc}%
\begin{tabular}[t]{|c|c|c|c|c|}
\hline
$\textbf{Q\#}$&$ \textbf{Skills}$&$ \textbf{Your}$&$ \textbf{Correct}$&$ \textbf{\%of Stu.}$\\
$ $&$ \textbf{Tested}$&$ \textbf{Answer}$&$ \textbf{Answer}$&$ \textbf{answered}$\\
$ $&$ $&$ $&$ $&$ \textbf{correctly}$\\
\hline
1&1&1&1&1\\
\hline
11&11&11&11&11\\
\hline
111&111&111&111&111\\
111&111&111&111&111\\
111&111&111&111&111\\
111&111&111&111&111\\
111&111&111&111&111\\
111&111&111&111&111\\
111&111&111&111&111\\
111&111&111&111&111\\
\hline
\end{tabular} &
\begin{tabular}[t]{|c|c|c|c|c|}
\hline
$\textbf{Q\#}$&$ \textbf{Skills}$&$ \textbf{Your}$&$ \textbf{Correct}$&$ \textbf{\%of Stu.}$\\
$ $&$ \textbf{Tested}$&$ \textbf{Answer}$&$ \textbf{Answer}$&$ \textbf{answered}$\\
$ $&$ $&$ $&$ $&$ \textbf{correctly}$\\
\hline
38&38&38&38&38\\
\hline
39&39&39&39&39\\
\hline
39&39&39&39&39\\
39&39&39&39&39\\
39&39&39&39&39\\
39&39&39&39&39\\

\hline
\end{tabular} \tabularnewline
\end{tabular}

\end{document}
  • I've two column landscape A3 page layout. Where out of two column, i've to put two tables next to each other. So \parbox{.2\textwidth} is very important. Some option mentioned is not working with parabox. I'm trying to create MWE; It'll be great if you've any other alternate option. – Pawan Mude Sep 20 '14 at 16:47
  • @PawanMude: The problem was that I did not have exactly this MWE ;-) –  Sep 20 '14 at 16:53
1

This is an old question, but I found it while searching for an answer to an identical one.

Anyway, an easy method would be to use the positioning argument of the parbox, pos. For example, you could align two parboxes like this:

\parbox[t]{.2\textwidth}{
...
}
\parbox[t]{.2\textwidth}{
...
}
MarkoF
  • 41