1

How to set the row height of a single row (the header in this case) with vertically center alignment?

Here's my MWE:

\documentclass{article}
\begin{document}
        \begin{tabular}{@{\extracolsep{\fill}} | *4{p{0.22\linewidth} | } }
            \hline
            \multicolumn{1}{|c|}{\small \textbf{Alfa}} &
            \multicolumn{1}{ c|}{\small \textbf{Bravo}}   &
            \multicolumn{1}{ c|}{\small \textbf{Charlie}}  &
            \multicolumn{1}{ c|}{\small \textbf{Delta}} \\ \hline \hline
            Name: \vspace{0.8cm} & Name: & Name: & Name: \\  
            \hline
            Date: \vspace{0.8cm}& Date: & Date: & Date: \\ \hline
        \end{tabular}
\end{document}
2

You can do that with the makecell package, which defines a common formatting for cells introduced by the \thead, \makecell and a few other commands. Among the parameters are lengths added at the top and bottom of these cells, through the \Gape command.

I also suggest to use the tabularx environment. Below, I give four possibilities:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[showframe]{geometry}

 \usepackage{tabularx, makecell, booktabs}
\renewcommand\theadfont{\small\bfseries}
\renewcommand\theadgape{\Gape[3ex]}
\renewcommand\cellgape{\Gape[4pt][0.8cm]}

 \begin{document}

 \centering
        \begin{tabular}{@{\extracolsep{\fill}} | *4{p{0.22\linewidth} | } }
            \hline
            \thead{Alfa} &
            \thead{Bravo} &
            \thead{Charlie} &
            \thead{Delta} \\ \hline \hline
            Name: \vspace{0.8cm} & Name: & Name: & Name: \\
            \hline
            Date: \vspace{0.8cm}& Date: & Date: & Date: \\ \hline
        \end{tabular}
\vskip 1cm
 \begin{tabularx}{\linewidth}{|*4{X |}}
            \hline
            \thead{Alfa} &
            \thead{Bravo} &
            \thead{Charlie} &
            \thead{Delta} \\ \hline \hline
            Name: \vspace{0.8cm} & Name: & Name: & Name: \\
            \hline
            Date: \vspace{0.8cm}& Date: & Date: & Date: \\ \hline
        \end{tabularx}
\vskip 1cm
 \begin{tabularx}{\linewidth}{l*4{X }}
             & \thead{Alfa} &
            \thead{Bravo} &
            \thead{Charlie} &
            \thead{Delta} \\
            \toprule
            Name: \vspace{0.8cm} & & & & \\
            \cmidrule(l){1-5}
            Date: \vspace{0.8cm}& & & & \\
           \bottomrule
        \end{tabularx}
\vskip 1cm
 \begin{tabularx}{\linewidth}{l!{\vrule width1pt}*4{X }}
             & \thead{Alfa} &
            \thead{Bravo} &
            \thead{Charlie} &
            \thead{Delta} \\
            \Xhline{1pt}
            \makecell[tl]{Name: } & & & & \\
            \makecell[tl]{Date:} & & & & \\
        \end{tabularx}

\end{document} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.