# How can I modify the Beamer footline in a way that doesn't change positioning of contents/sidebar?

I've started with the basic Berkeley theme in Beamer. I wanted to modify the footer to include the page numbers that are centered on the slide. However, the modified footline element seems to be "stacked" at the bottom of the slide, which shifts slide content up and cuts off the bottom corner of the sidebar.

I want the slide to look exactly like the basic theme with just the page numbers pasted at the bottom, centered. I want the sidebar to extend all the way to the bottom of the slide. What do I have to modify to get this done?

Example code:

\documentclass{beamer}
\usetheme[width=2.0cm]{Berkeley}

%% **this part modifies footline to include slide numbers**

\setbeamertemplate{footline}{%
\leavevmode%
\hbox{\begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=1ex,center]{frame number}%
\vskip0pt
\vskip0pt
\end{beamercolorbox}%
}%
\vskip0pt%
}

\usepackage[utf8]{inputenc}

\title{Sample title}
\author{Anonymous}
\institute{ShareLaTeX}
\date{2013}

\begin{document}

\frame{\titlepage}

\begin{frame}
\frametitle{Sample frame title}
This is a text in first frame. This is a text in first frame. This is a text in first frame.
\end{frame}

\end{document}


-
Welcome to TeX.SX! To mark code samples, you can indent lines by 4 spaces or enclose words in backticks , they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it, not the "quote" button with quotation mark). – Herr K. Jan 23 '14 at 23:00
Do you want the page numbers to be on the same line as the navigation symbols? If so, you can set ht=0pt, dp=0pt in the beamercolorbox, and set the second \vskip.5ex. – Herr K. Jan 23 '14 at 23:06
In this minimal example, I left the navigation symbols in. In my actual version, I have removed them. Ideally, I'd like the solution to include the option of either having them or not; however, if they are included, they should be on the same line to minimize wasted space. – user44666 Jan 23 '14 at 23:09

You can set ht=0pt, dp=0pt so that the beamercolorbox has zero height. Then, adjust the second \vskip to raise the page numbers from the bottom edge. To remove navigation bar, simply use \setbeamertemplate{navigation symbols}{}, and this does not affect the page numbering.

# Code

\documentclass{beamer}
\usetheme[width=2.0cm]{Berkeley}

%% **this part modifies footline to include slide numbers**
\setbeamertemplate{footline}{%
\leavevmode%
\hbox{\begin{beamercolorbox}[wd=\paperwidth,ht=0ex,dp=0ex,center]{frame number}%
\vskip0pt
\usebeamerfont{footline}\usebeamercolor[fg]{footline}
\vskip.5ex
\end{beamercolorbox}%
}%
\vskip0pt%
}

\usepackage[utf8]{inputenc}

\title{Sample title}
\author{Anonymous}
\institute{ShareLaTeX}
\date{2013}

\begin{document}

\frame{\titlepage}

\begin{frame}
\frametitle{Sample frame title}
This is a text in first frame. This is a text in first frame. This is a text in first frame.
\end{frame}

\end{document}
`

# Output

-
Thank you. This works as I had wanted. Therefore, I'll accept this as my solution. However, I'm a brand new beamer user and relatively new LaTeX/TeX user. Even though your answer is the simplest given my starting point, is there a more elegant solution to my problem rather than drawing boxes of zero height? It just seems kind of hack-ish, and I want to make sure I'm learning the right mechanisms for accomplishing the layout I want. – user44666 Jan 23 '14 at 23:31
@user44666 In fact, I would call Kevin C's solution elegant: other solutions might be longer and not as simple as his. Using boxes width zero height can be a very useful resource. – Gonzalo Medina Jan 23 '14 at 23:59