Align left and right same line
A \hfill
that occurs at the start of a line will be ignored. To avoid this, use \null\hfill
in place of \hfill
.
Don't use \hfill
for the alignment, use \flushleft
and \flushright
:
\begin{minipage}[t]{7cm}
\flushleft
\textsc{Relator}
Prof. NameName\\
\end{minipage}
\hfill
\begin{minipage}[t]{7cm}
\flushright
\textsc{Candidato}
Name Name\\
Matricola: XXXXX
\end{minipage}