GeneralControlling the vertical align of contents in table cell?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
benowar
Posts: 33
Joined: Mon Aug 06, 2007 2:05 pm

Controlling the vertical align of contents in table cell?

Post by benowar »

Hi,

is there any way to vertically align the contents of a table cell? I have a table with 2 columns. The content in the second column is big enough to cause line wrapping. Now, the content of the first column is just a single word and it gets centered vertically. What I would like is the content of the first column to align on top of the cell and not the center.

The code I use for the table is:

\begin{tabular}{ m{.25\textwidth}@{\extracolsep{5mm}} m{.60\textwidth} }

Thanks,
Ben

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Controlling the vertical align of contents in table cell?

Post by localghost »

It would be good to have a minimum working example (MWE) to figure out what's going wrong.
balfonsi
Posts: 93
Joined: Wed Mar 14, 2007 12:05 am

Re: Controlling the vertical align of contents in table cell?

Post by balfonsi »

Just use p{0.25\textwidth} instead of m{0.25\textwidth} (cf doc for the array package).

B.A.
benowar
Posts: 33
Joined: Mon Aug 06, 2007 2:05 pm

Re: Controlling the vertical align of contents in table cell?

Post by benowar »

Awesome, using "p" did the trick!

Thanks,
Ben
Post Reply