TikzPageNodes absolute positioning guide: https://drive.google.com/file/d/1BRPd...
%%%%%%%%%%%%%% MWE CODE
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage[top=4cm,bottom=4cm,headheight=2cm,footskip=3cm,marginparwidth=2cm]{geometry}
\usepackage{fancyhdr}
\usepackage{tikz}
\usepackage{tikzpagenodes}
%custom template layout
\newcommand{\mypage}{%
\begin{tikzpicture}[remember picture, overlay]
\fill[fill=gray](current page.north west) rectangle ([yshift=-30mm]current page.north east) node[midway] {\Huge\bfseries\sffamily\color{white}{Here is my title}};
\node at (current page footer area) {\Huge\bfseries\sffamily\ Page \thepage};
\end{tikzpicture}
}%
%load page style
\fancypagestyle{MyPageStyle}{%
\fancyhf{}
\fancyhead[C]{\mypage}
\renewcommand{\headrulewidth}{0pt}
}%
\pagestyle{MyPageStyle}
\begin{document}
\lipsum[1-50]
\end{document}
Watch video LaTeX in a Minute: Custom Page Layout online without registration, duration hours minute second in high quality. This video was added by user Maths Partner 25 November 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 8,904 once and liked it 79 people.