I am preparing an application for a European innovation project call, using the H2020prposal.cls template. However some of the tables built by using the class have (stupidly) changed shape in the official template supplied, and I am trying to mimic one that is strange. I am facing difficulties in coloring the lower cells. By trial and error, I could manage to fill properly both upper and lower cells of the column4, but this is not clean, and every change of document margin affects the results and the upper and lower cells are not evenly filled. What would be a cleaner way ?
\documentclass[a4paper]{article}
\usepackage[left=15 mm, right=15mm]{geometry}
\usepackage[utf8x]{inputenc}
\usepackage[table]{xcolor}
\usepackage{multirow}
\usepackage{tabularx}
\begin{document}
\begin{tabularx}{.98\textwidth}{|>{\centering}p{4.5em}|p{12em}|>{\centering}p{5em}|>{\centering}p{4.5em}|>{\centering}p{4.5em}|>{\centering}p{4.5em}|>{\centering\arraybackslash}X|}
\hline
\cellcolor{gray!40} \textbf{Work package N°}
&\cellcolor{gray!40}\textbf{Work package title}
&\cellcolor{gray!40}\textbf{Lead participant N°}
&\cellcolor{gray!40}\textbf{Lead Participant Short Name}
&\cellcolor{gray!40}\textbf{Person Months}
&\cellcolor{gray!40}\textbf{Start month}
&\cellcolor{gray!40}\textbf{End Month}\\
\hline
\textbf{WP1}& MANAGEMENT WORK PACKAGE& 1 & TOE & 4 & 1 & 16 \\
\hline
\textbf{WP1}& DEVELOPMENT WORK PACKAGE& 2 & ARC & 8 & 1 & 8 \\
\hline
\multicolumn{3} {l}{} & \multicolumn{1}{|> {\raggedleft}p{4.5em}|} {\cellcolor{gray!40} \textbf{Total person month:}} &\multicolumn{1} {c|}{55} &\multicolumn{2} {l}{}\\
\cline{4-7}
\multicolumn{3} {l|}{} & \multicolumn{2} {> {\raggedleft}p{10em}|}{\cellcolor{gray!40} \textbf{Overall Start and End Months foreseen:}} & 1& 24 \\
\cline{4-7}
\end{tabularx}
\end{document}
