# Align image and text horizontally [closed]

I am trying to align an image and text horizontally on a page.

This is an extra question for what I have asked here. I got some suggestions in comments: like add [t] to the minipage, but it does not seem to work.

My code:

\noindent\fbox{\includegraphics[width = 0.5\linewidth, valign=c]{graph_southampton.PNG}}\hfill
\begin{minipage}{0.40\textwidth}\centering
The picture on the left represents \\
a \textcolor{blue}{graph}. The \textcolor{blue}{source} point is \\
corresponds to Southampton whereas \\
the \textcolor{blue}{destinations} are the other cities. \newline
The edges are also labeled with the shortest path between the cities.
\end{minipage}


## closed as unclear what you're asking by Zarko, user156344, Stefan Pinnow, Raaja, dexteritasMay 15 at 8:20

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• showed result has not been generated with showed code (why you use it from Bernard answer, which you not accept?). it gives perfect result. so your question is not clear. – Zarko May 15 at 1:36

\documentclass{article}
$\vcenter{\hbox{\fbox{\includegraphics[width=4cm]{example-image-duck}}}}% \vcenter{\begin{minipage}{0.5\textwidth}\centering The picture on the left represents \\ a \textcolor{blue}{graph}. The \textcolor{blue}{source} point is \\ corresponds to Southampton whereas \\ the \textcolor{blue}{destinations} are the other cities. \newline The edges are also labeled with the shortest path between the cities. \end{minipage} }$

Personally I would use a tcolorbox because then you will most likely have a tool that can be used to address all layout wishes.