# Move frame content to default position with a beamer color box

I'm a relative neophyte to Beamer and LaTeX in general. I've started developing a custom Beamer template for my department to use and have begun formatting the content of the frames.

The following MWE produces the below slide:

\documentclass{beamer}

\definecolor{this color}{RGB}{0,48,119}
\setbeamercolor*{running text}{fg = this color}

% Other pages
% Frame title
\defbeamertemplate*{frametitle}{}[1][]
{
\vskip0.1cm%
\begin{beamercolorbox}[wd=12cm, leftskip = 0.005cm, sep=8pt, #1]     {this color}
\usebeamerfont{frametitle}\insertframetitle\par%
\end{beamercolorbox}%
\vfill
}

% Autopopulate date
\date{\today}

\begin{document}

\title{Working with a test beamer presentation}

\begin{frame}
\titlepage
\end{frame}

\begin{frame}
\frametitle{Title goes here}

Here is some content.  I'd like to have it's position as the default.
\begin{itemize}
\item Including the colorbox probably pushed it down
\item Can I include the colorbox \textit{AND} move the frame content back up?
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Another title}

Yup.  Not centered.
\end{frame}

\end{document}


Below is what the frame looks like. I'd like to move the content of the slide back to the default position. Can I do that with the inclusion of the color box in the frame? If not, what can I do to keep the frame title in it's current position and have the content moved back to the center of the frame?

The title is moved based upon the images used in the custom background/template. It's position is correct, so there's no way I can change it's location.

• try replace \vfill with \vfil – touhami May 23 '16 at 14:59
• @touhami Wow. That was easy. Thanks! You should add as an answer so I can accept. – Steven May 23 '16 at 15:01
• Just one tip: When you are developing a theme for a wider audience, try to avoid measurements in absolute units, e.g. wd=12cm, but give them in units of \paperwidth. This make the theme safe in case someone needs for example a different page geometry, 16:9 ratio, etc. – samcarter is at topanswers.xyz May 23 '16 at 15:11
• Thanks for the tip @samcarter. I cobbled together the theme from bits and pieces that I found online, rather than writing it outright. I'm also still in the Beamer/LaTeX learning stage, too, so any information like that is helpful. – Steven May 23 '16 at 15:13

The solution is to replace \vfill with \vfil

\defbeamertemplate*{frametitle}{}[1][]
{
\vskip0.1cm%
\begin{beamercolorbox}[wd=12cm, leftskip = 0.005cm, sep=8pt, #1]     {this color}
\usebeamerfont{frametitle}\insertframetitle\par%
\end{beamercolorbox}%
\vfil%                   % \vfill   replaced
}


For more details see What is the difference between 'fil' and 'fill'?