1

I'm trying to align 2 boxes horizontally. I would like the left one to start at the far left and the right one to start at the far right.

\begin{titlepage}
    \begin{center}
      \vspace*{1cm}
      {\tiny \hrule height 0.001pt}
      \vspace{5pt}
      \setlength{\baselineskip}{1.5\baselineskip} \textsf{{\LARGE Title}} \par
      \vspace{13pt}
      {\tiny \hrule height 0.01pt}
      \large\texttt{Some name}\\
      \vfill
      \large\textit{some text}
      \vspace{2cm}
      {\tiny \hrule height 0.001pt}
      \begin{minipage}[t]{0.4\textwidth}
         \begin{center}
            \emph{text}
            \begin{center}
                test
            \end{center}
         \end{center}
      \end{minipage}    
      \begin{minipage}[t]{0.4\textwidth}    
         \begin{framed}    
             \begin{center}    
                 \emph{text}
             \end{center}    
         \end{framed}    
      \end{minipage}            
      \vspace{2cm}          
      \large Some random text   
   \end{center}    
\end{titlepage}

I tried flushleft but it doesn't seem to work the way I wish. I'm also wondering why the framed one doesn't take the same space as the not framed one.

I added the last hrule to show where I would like my left minipage to start (at the left) and my right minipage to end (at the right).

Thanks in advance.

2
  • 2
    Put a \hfill between the two minipages. That will probably solve it. As for the extra space, I guess it is the extra spaces around the framed. If you make it into a complete working example we can try it out, instead of guessing. May 3, 2021 at 8:39
  • I provided as much details as I could. It only lacked \begin{document} and \end{document} but I left it that way because I didn't know if the \input{titlepage} in the original document has anything to do with it.
    – Dunno
    May 3, 2021 at 10:16

1 Answer 1

1

\hfill solved the problem. Now it fills the page's width.

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.