# Imposing similar heights for boxes using tabular

I would like to edit my previous post about adjusting the height of boxes.

Ideally, I would like to have 2 boxes side by side aligned with the margins of a template. It was suggested to me to use 'tabular' which I tried to do in my case. Unfortunately, I don't know how I can adjust the height to impose the same for both boxes...

It is sure an obvious issue to solve but I would like your help to understand it,

\documentclass{beamer}

\usepackage{fancybox}

\begin{document}

\begin{frame}
\setlength\fboxrule{1pt}
\begin{tabular}{cc}
%moments & canonique \\
\fcolorbox{blue!50!black}{white}{\begin{aligned} \nabla \zeta_0 = -\frac{\delta r}{h^{*}} \ \text{avec :}\ \frac{1}{h^{*}} = \frac{1}{\alpha h_p} - \frac{1}{H} \end{aligned}} &
\fcolorbox{blue!50!black}{white}{\begin{aligned} \alpha = 1 - \frac{n}{n'} \ \text{et :} \ h_p = h_0 \end{aligned}} \\
\end{tabular}
\end{frame}
\end{document}


I'll try to convince you for the 3rd time of tikz-hf:

\documentclass{beamer}

\usepackage[beamer,customcolors,nofill,norndcorners]{hf-tikz}
\hfsetbordercolor{blue!50!black}

\begin{document}

\begin{frame}

$\displaystyle\tikzmarkin<1->{a}(0.1,-0.4)(-0.1,0.6) \nabla \zeta_0 = -\frac{\delta r}{h^{*}} \ \text{avec :}\ \frac{1}{h^{*}} = \frac{1}{\alpha h_p} - \frac{1}{H} \tikzmarkend{a}$
\hfill
$\displaystyle\tikzmarkin<1->{b}(0.1,-0.4)(-0.1,0.6) \alpha = 1 - \frac{n}{n'} \ \text{et :} \ h_p = h_0 \tikzmarkend{b}$
\end{frame}
\end{document}


You can also use an equal height group from tcolorbox

\documentclass{beamer}
\usepackage{tcolorbox}

\tcbset{
mybox/.style={size=fbox, sharp corners, colback=white,
colframe=blue, equal height group=equalbox,
before=, after=\hfill, hbox, valign=center}
}

\begin{document}

\begin{frame}

\begin{tcolorbox}[mybox]
$\displaystyle \nabla \zeta_0 = -\frac{\delta r}{h^{*}} \ \text{avec :}\ \frac{1}{h^{*}} = \frac{1}{\alpha h_p} - \frac{1}{H}$
\end{tcolorbox}
\begin{tcolorbox}[mybox]
$\displaystyle \alpha = 1 - \frac{n}{n'} \ \text{et :} \ h_p = h_0$
\end{tcolorbox}
\end{frame}
\end{document}


This is typical task for use of \vphantom macro:

   \fcolorbox{blue!50!black}{white}{\begin{aligned} \nabla \zeta_0 = -\frac{\delta r}{h^{*}} \ \text{avec :}\ \frac{1}{h^{*}} = \frac{1}{\alpha h_p} - \frac{1}{H} \end{aligned}} &
\fcolorbox{blue!50!black}{white}{\$
\begin{aligned}
\vphantom{\frac{1}{h_p}}
\alpha = 1 - \frac{n}{n'} \ \text{et :} \ h_p = h_0
\end{aligned}