Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

When I change the background color of a cell in a table, the color covers the borders, however I want the horizontal lines to remain. I have a simple command \cellcolor[gray]{0.9} in my table. Can anybody help me with this problem?

share|improve this question
add comment

1 Answer

Please always provide a complete small example that demonstrates the problem. If the lines are from \hline then it is not supposed to happen. If they are from \cline then that is amdocumented feature and the colortbl documentation suggests that you try \hhline instead. With the amount of information in the question, it is impossible to say.

share|improve this answer
    
Thank you for your answer I had used \cline as below code, and replacing \hhline solved my problem. \begin{table} \centering \begin{tabular}{ccc} \hline 1 &2 &\cellcolor[gray]{0.9}3 \cline{2-3} \hline 4 &5 &\cellcolor[gray]{0.9}6 \end{tabular} \end{table} –  Nargess Oct 10 '12 at 13:36
    
@Nargess: Please consider to upvote and accept Davids answer if it was helpful for you. Thats the way you say thank you here. –  Kurt Oct 10 '12 at 14:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.