The cline between the colored cells 1 and 2 in the example below has been overridden by the cellcolor command.
I was wondering whether there exists a way to make the line separating these two cells on top of the yellow color. Any help is highly appreciated.
Thanks
Hartmut Helmut
\documentclass[a4paper,11pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage[english]{babel}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{multirow}
\begin{document}
\begin{center}
\begin{table}
\begin{tabular}{|c|c|c|c|c|c|c|}\hline
Days & 3 & 6 & 9 & 12 & 15 & 18 \\
\hline\hline
\multirow{2}{*}{Project} & \multicolumn{4}{c|}{\cellcolor{yellow} 1} & & \\
\cline{2-7}
& & & \multicolumn{4}{c|}{\cellcolor{yellow} 2} \\
\hline
\end{tabular}
\end{table}
\end{center}
\end{document}
Best Answer
With
hhline
. B.t.w., don't nest yourtable
environment incenter
, as it adds an unwanted supplementary vertical spacing. Use the directive\centering
instead.