# Horizontal alignment of multiple images [duplicate]

In the current scenario, the images are arranged in a vertical sense, however I wanted to align the subfigures in a horizontal sense. This is the code that I'm using. Also I'm working on a template, which follows IEEE convention.

\begin{figure}[h]
\begin{subfigure}[b]{0.25\textwidth}
\end{subfigure}
\begin{subfigure}[b]{0.25\textwidth}
\includegraphics[width=0.7\linewidth,height=5cm]{MobileApp/Selectcanteen.png}
\caption{Select Canteen Screen}
\label{fig:Select canteen screen}
\end{subfigure}

\caption{Caption for this figure with two images}
\label{fig:image2}
\end{figure}

• I didn't see this question before. I suggest you use 0.5\columnwidth instead of 0.25\textwidth because the \textwidth does not take the column separation into account, so when you add the % at the end of \end{subfigure} your pictures will overflow the margin (and you'll get a Overfull \hbox warning). – Phelype Oleinik May 3 '19 at 13:48
• @PhelypeOleinik Ya, this problem too got solved by adding just a % at the end. Thanks for the suggestion! – Amey Meher May 3 '19 at 13:54
• Though this one also has the % problem, I marked with a differen duplicate about the difference of \textwidth and \columnwidth (and other \...widths :) – Phelype Oleinik May 3 '19 at 13:57
• Nice :) Actually had a confusion with those terms too :P – Amey Meher May 3 '19 at 13:59