# How to split a frame (of beamer) into 2 parts (minipage) side by side?

I would like to split a frame into 2 parts side by side by minipage. But it seems that the following code puts one on top of the other:

\begin{minipage}[t]{0.48\linewidth}
left part
\end{minipage}\hfill
\begin{minipage}[t]{0.48\linewidth}
right part
\end{minipage}


Could anyone tell me how to do that, and if it is correct to set 0.48\linewidth?

-
The fact that you say "frame" and have tagged this "beamer" makes me think that this is part of a presentation. Since many things are set up slightly differently for presentations than for ordinary articles, a minimum working example is really important here. Please add a full example including preamble. –  Loop Space Aug 29 '11 at 10:04

A minipage or a parbox or a box in general need a \noindent to prevent the indention at the beginning of a paragraph.

\documentclass{article}
\begin{document}
\fboxsep=0pt
\noindent\fbox{%
\begin{minipage}[t]{0.48\linewidth}
left part
\end{minipage}}%
\hfill%
\fbox{%
\begin{minipage}[t]{0.48\linewidth}
right part
\end{minipage}
}

\end{document}


I am sure that Raphink knows the answer but you don't provide a minimal example to show the problem.

I used the command \frame to demonstrate the left and right part.

EDIT: How Andrew Stacey commented here the solution with beamer. beamer provides additional features / environments like columns which is used in the minimal example. For more details have a look at the documentation.

\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{columns}[T] % align columns
\begin{column}{.48\textwidth}
\color{red}\rule{\linewidth}{4pt}

Left Part
\end{column}%
\hfill%
\begin{column}{.48\textwidth}
\color{blue}\rule{\linewidth}{4pt}

Right Part
\end{column}%
\end{columns}
\end{frame}
\end{document}


-

You should add a \hfill between the two minipages.

Using 0.48\textwidth is indeed a correct way of splitting the page.

-
it still does not work... –  SoftTimur Aug 29 '11 at 9:47
It works for me. Can you post a MWE? –  ℝaphink Aug 29 '11 at 9:48
Note that editing your question to add \hfill makes my answer moot while it doesn't help as long as you don't provide a MWE demonstrating the problem. –  ℝaphink Aug 29 '11 at 9:57
That is true... –  SoftTimur Aug 29 '11 at 10:36