[Tex/LaTex] Color running over text in multirow column

colortables

I have a simple table with 2 multirow cells. However when I apply background color, it covers
the lower portion of the multirow cells and cuts through the middle of my text entry which is obviously not what I want. Can someone please tell me what I'm doing wrong here? Also notice that I'm using \vspace to move my text entry 1mm up in the multirow cells because it wasn't centered. It was closer to the lower border. There is probably a better way of doing this. Below is my code and output table that I'm getting with it:enter image description here

\documentclass[12pt]{article}

\usepackage{latexsym,amssymb}
\usepackage{colortbl}
\usepackage[margin=1in,headsep=2.5cm]{geometry}
\usepackage{multirow}

\definecolor{mycolor}{rgb}{0.92,0.95,0.86}
\arrayrulecolor{white}

\setlength{\parindent}{0pt}
\setlength{\doublerulesep}{2pt}
\setlength{\extrarowheight}{3pt}

\begin{document}

\begin{tabular}
{ >{\columncolor{mycolor}}b{79pt}
>{\columncolor{mycolor}}b{145pt}|| 
>{\columncolor{mycolor}}b{79pt}
>{\columncolor{mycolor}}b{145pt} }
\multicolumn{2}{>{\cellcolor{mycolor}}l||}{\textbf{STUDENT DATA}}& 
\multirow{2}{*}{{\vspace{-1mm}\textbf{Name:}}} & \multirow{2}{*}{\vspace{-1mm}MyName}\\
\textbf{E-mail:} & test@example.com &  & \\
\hline \hline
\textbf{Date:} & 21.3.2011 & \textbf{Student ID:} & 3836127\\
\end{tabular}

\end{document}  

Best Answer

This is because the lower cells of the \multirow are filled after the text was typeset. To solve this you need to place the text in the lower cells and raise it, e.g. using \raisebox:

\documentclass[12pt]{article}

\usepackage{latexsym,amssymb}
\usepackage{colortbl}
\usepackage[margin=1in,headsep=2.5cm]{geometry}
\usepackage{multirow}

\definecolor{mycolor}{rgb}{0.92,0.95,0.86}
\arrayrulecolor{white}

\setlength{\parindent}{0pt}
\setlength{\doublerulesep}{2pt}
\setlength{\extrarowheight}{3pt}

\begin{document}

\begin{tabular}
{ >{\columncolor{mycolor}}b{79pt}
>{\columncolor{mycolor}}b{145pt}|| 
>{\columncolor{mycolor}}b{79pt}
>{\columncolor{mycolor}}b{145pt} }
\multicolumn{2}{>{\cellcolor{mycolor}}l||}{\textbf{STUDENT DATA}}&&\\
\textbf{E-mail:} & test@example.com & \raisebox{1.6ex}[1.6ex]{\textbf{Name:}} & \raisebox{1.6ex}[1.6ex]{MyName}\\
\hline \hline
\textbf{Date:} & 21.3.2011 & \textbf{Student ID:} & 3836127\\
\end{tabular}

\end{document} 

Please also make sure to provide minimal examples. Half the code here is not required to demonstrate the issue and therefore finding the issue takes longer as necessary.

Related Question