I have a table in my documentation, where i'm switching the rowcolor between white(default) and gray. Those rows, where the color is changed with \rowcolor{gray}
, disabling the horizontal and vertical lines?
\begin{table}[h]
\begin{tabular}{|l|p{7cm}|}
\hline
\rowcolor{Blackgray}
\textcolor{white}{\textit{Column 1}} & \textcolor{white}{\textit{Column 2}} \\ \hline
Fooo -- Bar & Some text here with enum:
\begin{itemize}
\item Item1
\item Item2
\item ...
\end{itemize} \\ \hline
\rowcolor{Gray}
Foo -- Baar & Some text here.... \\ \hline
Fooo -- Baaaar & Some other text here \\ \hline
\rowcolor{Gray}
Baar -- FOOO & Nope
\begin{itemize}
\item Item1
\end{itemize} \\ \hline
\end{tabular}
\end{table}
What is wrong with my latex? why are there no vertical and horizontal lines? What should i include in my latex?
Best Answer
This happens because
colortbl
draws the rows over the columns.Adopt this trick.
Add the following lines in your preamble:
MWE (I've changed your custom colors)
Output: