# Align image exactly beside table

I'm trying to align an image beside a table. The image is floated below the table.

This is my code:

\multirow{4}{*}{\includegraphics[width=1.5in,height=0.8in]{IIIT}}
&                     &       &    \\
&  Shubham Rathi      &  Male       &                             \\
&  Computer Science   &  B. Tech + MS (Computational Humanities)        &      \\
&  IIIT Hyderabad     &     &         \\
&                     &      &
{\includegraphics[width=0.8in]{Icon}}
\end{tabular}


This is how I want it to be:

What am I doing wrong? How do I correct?

Here is the sharelatex file: https://www.sharelatex.com/project/57e542d03afea89017192474

• probable dupicate of tex.stackexchange.com/a/331557/1952 or tex.stackexchange.com/q/237699/1952 – Ignasi Sep 29 '16 at 10:38
• Why don't you use another multirow for second image? \multirow{4}{*}{\includegraphics[width=1.5in,height=0.8in]{IIIT}} & & & \multirow{4}{*}\includegraphics[width=1.5in,height=0.8in]{icon}}\\  – Ignasi Sep 29 '16 at 10:43

As @Ignasi said you can use another multirow which provides a construction for table cells that span more than one row.

Here we merge four cells in the first column to insert first image and do the same with the fourth column to insert second image

\documentclass{article}
\usepackage{geometry}
\usepackage{multirow}
\usepackage{graphicx}

\geometry{left=0.75in,top=0.75in,right=0.7in,bottom=0.75in}
\begin{document}
\begin{table}[h]
\centering
\label{my-label1}
\bfseries

\begin{tabular}{llll}
\multirow{4}{*}{\includegraphics[width=1.5in,height=0.8in]{IIIT}}
&                     &                                                 &
\multirow{4}{*}{\includegraphics[width=0.8in]{Icon}}                              \\
&  Shubham Rathi      &  Male                                           & \\
&  Computer Science   &  B. Tech + MS (Computational Humanities)        & \\
&  IIIT Hyderabad     &                                                 & \\
\end{tabular}
\end{table}
\end{document}


• This is great! But I dont understand how the icon is floated to the left. Can you please explain how this works? – user3426358 Sep 29 '16 at 14:27

You can use a table with nested tables, exploiting the fact that the default vertical alignment for tabular is centered.

\documentclass{article}
\usepackage{graphicx}

\begin{document}

\noindent\makebox[\textwidth]{% stick in the margins
\begin{tabular}{@{}ccc@{}}
\begin{tabular}{@{}c@{}}% left image
\includegraphics[width=1.5in,height=0.8in]{example-image-a}
\end{tabular}
&
\begin{tabular}{@{}ll@{}}% data in the center
Shubham Rathi      &  Male                                    \\
Computer Science   &  B. Tech + MS (Computational Humanities) \\