This code makes the borders disappear in the coloured cells. How do I get the borders back? Have tried hhline
and this doesn't work.
\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{graphicx}
\begin{document}
\begin{table}
\resizebox{\textwidth}{!}{%
\begin{tabular}{lll}
\multicolumn{1}{c}{\textbf{Table}} & \multicolumn{1}{c}{\textbf{}} & \\
& a & b \\ \cline{2-3}
\multicolumn{1}{l|}{a} & \multicolumn{1}{l|}{\cellcolor[HTML] {FE0000}\textit{}} & \multicolumn{1}{l|}{} \\ \hline
\multicolumn{1}{|l|}{\textit{b}} & \multicolumn{1}{l|}{\cellcolor[HTML] {CD9934}} & \multicolumn{1}{l|}{} \\ \hline
\end{tabular}%
}
\caption{My caption}
\label{my-label}
\end{table}
\end{document}
Best Answer
Thuis is known issue with
\cline{...}
andcolortbl
. In such situations lines from packagehhline
is handy: