I'm trying to align my header to the right side but it is not going all the way to the right.

enter image description here

Here is a minimal example (I'm including my margins in case that is part of the problem? I honestly have no idea):




\topmargin = -.25 in
\parskip = 0.1in
\parindent = 0.0in



  • 2
    Use \usepackage{showframe} and you could see how wrong are your margins setup. Use geometry to setup margins. – Sigur May 14 '15 at 8:43
  • @Sigur the geometry package was exactly what I needed, thank you so much! – a cast May 14 '15 at 8:54
  • @a cast, Welcome! Use the search filed here on TEX.SE. There are many good examples. – Sigur May 14 '15 at 8:57

You should set \pagestyle{fancy} after having set the page parameters, because fancyhdr uses the current text width for preparing its headers and footers.

I recommend using geometry, though: probably



is sufficient for your needs.

Above all, never set \hoffset and \voffset: they are thought for making corrections in case the output driver needs them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.