I want to have a variety of page styles used throughout my document, with different header and footer formats / content.

I'm having trouble with getting the footer to not flow off the page.

The work-around I have used is to set the positioning absolutely, as per example below:

\documentclass[12pt, a4paper]{article}

\usepackage{blindtext}
\usepackage{fancyhdr}
\usepackage[margin=2cm, includefoot]{geometry}

\usepackage[utf8]{inputenc}
\usepackage{lastpage}
\usepackage{mdwlist}
\usepackage{titlesec}

\fancypagestyle{firstpagestyle}
{
\fancyhf{} % clear all header and footer fields
\small diff header line 1 \\
\small diff header line 2 \\
}
\cfoot{\thepage \ of \pageref{LastPage}}

\setlength{\footskip}{15pt}

}

\fancypagestyle{otherpagesstyle} {
\fancyhf{} % clear all header and footer fields
}
\cfoot{\thepage \ of \pageref{LastPage}}

\setlength{\footskip}{42pt}
}

\pagestyle{otherpagesstyle}

%==============================================
\begin{document}

\thispagestyle{firstpagestyle}
%==============================================

\subsection*{Section0}
\vspace{-0.4em}
\blindtext

%==============================================

\subsection*{Section1}
\vspace{-0.4em}
\hrule
\vspace{1em}

\blinditemize
\blindtext
\blinditemize
\blindtext
%==============================================
\subsection*{Section2}
\vspace{-0.4em}
\hrule
\vspace{1em}

\blindtext
\blinditemize
\blindtext
\blinditemize
\blindtext
\blinditemize
\blindtext
\end{document}


However I'm not satisfied with this solution as it doesn't seem like it will scale well for more complicated documents, not to mention coupling between the header / footer / text area, so that a change to one will possibly require a (manually calculated) change to all.

I have tried to alter the textheight attribute per pagestyle but 'firstpagestyle' doesn't seem to overload the default settings (eg \pagestyle{otherpagesstyle})....

Is there a neater way to do this?

-
You shouldn't be setting \headheight and \footskip as part of the page style. Bad things happen. –  egreg Dec 27 '12 at 18:40
@egreg what's the best practice way to solve the warning \headheight is too small? –  neuronotic Dec 27 '12 at 18:44

Since your problem is only in the first page, just use the same head height throughout and do as if the first header block fits in it.

\documentclass[12pt, a4paper]{article}

\usepackage{blindtext}
% headheight=25pt has been suggested by fancyhdr
\usepackage{fancyhdr}

\usepackage{lastpage}

\fancypagestyle{firstpagestyle}{
\fancyhf{} % clear all header and footer fields
\parbox[t][\ht\strutbox]{\textwidth}{
\centering
\small diff header line 1 \\
\small diff header line 2\endgraf % not \par because \fancypagestyle is not \long
\kern4pt
\hrule height2pt
}%
}
\fancyfoot[C]{\thepage \ of \pageref{LastPage}}
}

\fancypagestyle{otherpagesstyle}{
\fancyhf{} % clear all header and footer fields
\fancyfoot[C]{\thepage \ of \pageref{LastPage}}
}

\pagestyle{otherpagesstyle}

%==============================================
\begin{document}
\thispagestyle{firstpagestyle}
\vspace*{1sp} % adjust here in case you need more room
%==============================================

\section{Section0}
\blindtext

%==============================================

\section{Section1}

\blinditemize
\blindtext
\blinditemize
\blindtext

%==============================================
\section{Section2}

\blindtext
\blinditemize
\blindtext
\blinditemize
\blindtext
\blinditemize
\blindtext

\end{document}

-