# Minipage won't format properly

I need help with this. Why Block B is being printed below Block A? I need to have it right to Block A.

\documentclass[10pt]{article} % Font size - 10pt, 11pt or 12pt.

\usepackage[hmargin=1.25cm, vmargin=1.5cm]{geometry} % Document margins.

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\rfoot{{\sffamily Last update: \today}}

\begin{document}

\begin{minipage}[t]{0.5\textwidth} % Start the left-hand side of the page.
\vspace{0pt} % Trick for alignment.
Block A.
\end{minipage} % End the left-hand side of the page.

\hfill % ----------------------------------------------------------------------

\begin{minipage}[t]{0.44\textwidth} % Start the right-hand side of the page.
\vspace{0pt} % Trick for alignment.
Block B.
\end{minipage} % End right-hand side of the page.

\end{document}

-

\documentclass[10pt]{article} % Font size - 10pt, 11pt or 12pt.

\usepackage[hmargin=1.25cm, vmargin=1.5cm]{geometry} % Document margins.

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\rfoot{{\sffamily Last update: \today}}

\begin{document}

\noindent
\begin{minipage}[t]{0.5\textwidth}% Start the left-hand side of the page.
Block A.
\end{minipage}% End the left-hand side of the page
\hfill % ----------------------------------------------------------------------
\begin{minipage}[t]{0.44\textwidth}% Start the right-hand side of the page.
Block B.
\end{minipage}% End right-hand side of the page.

\end{document}


I have moved the spaces before your % as these will produce unwanted white space in the output, I removed the paragraph breaks between the minipages and removed the vspace "trick" which would prevent the minipages aligning on the baseline of their first row.

-
I need to say that minipage have strange behaviour. Should I go for columns instead of minipage? Or maybe there is some better solution? –  Teddy Feb 10 '13 at 17:36
minipage are just positioned the same way a letter is positioned they really don't have any behaviour at all strange or otherwise. You haven't given much indication of the intention of the layout but using twocolumn mode or a table are possibilities depending what you need. –  David Carlisle Feb 10 '13 at 17:41
I need to make two columns on one page AND I don't want to bother about that I have wrong formatting (spaces) that can screw up all my work. –  Teddy Feb 10 '13 at 17:47
why one column wider than the other? In TeX you always have to worry about spaces, then input AB and the input A B are different: white space in the source may produce white space in the output. –  David Carlisle Feb 10 '13 at 17:58