# How to change the header layout?

I am typing an article. I have used fancyhdr for the header and footer. Now my problem is that the header, which is set by default to the name of the section appears on the top right of all pages. I want to change it. I want it to appear on the top right for odd pages and on the top left for even pages. please help.

You must use the option twoside for the standard class article.

\documentclass[twoside]{article}


article and report classes come with oneside as option by default.

\documentclass[twoside]{article}
\usepackage{mwe} %For blindtext
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[C]{\thepage}
\begin{document}
\section{First section}
\blindtext
\newpage
\blindtext
\newpage
\section{Second section}
\blindtext
\newpage
\blindtext
\end{document}