1

the borders of the colored cells disappear in low size and appear when zooming in. Here is my code

\documentclass[12pt, fleqn]{article}
\usepackage[portuges]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{colortbl}
\usepackage{hhline}


\begin{document}

\begin{table}[ht]
\centering
\begin{tabular}{|c|c|c|c|c|}
\hline
\rowcolor[gray]{0.8} A & B & C & D      & E\\
                             &          &       & number1 & number2\\\hline
                          10 &       20 &    30 &         20 & 10\\
                             &          &    15 &            &  8\\\hline
\end{tabular}
\caption{}
\end{table}


\end{document}

I want the upper horizontal line to appear. But the result is as shown here.. enter image description here

i know it is a duplicate question how to prevent cell color to cover table's borders?, but the solutions provided didn't solve my problem.

Fadwa
  • 571
  • I used \hline instead of \cline and still the same result."the upper border disappear" – Fadwa Mar 04 '14 at 13:27
  • I can't reproduce your problem, but i do not know which package you use. For more help, please make minimal working example with \documentclass{..}\usepackage{...}\begin{document} ... your code ... \end{document} – Zarko Mar 04 '14 at 13:44
  • Well, use \setlength{\arrayrulewidth}{2pt} to increase the thickness of rules in a table. – Jesse Mar 04 '14 at 13:53
  • 4
    the lines are thin to start with and you are making them only 65% of that, just use thicker lines. Also you have spurious white space into the left and right of your tabular, in the box due to missing % at ends of lines. – David Carlisle Mar 04 '14 at 15:16
  • @Zarko Edited ... – Fadwa Mar 04 '14 at 20:01
  • On my system with your MWE, there is no difference between the width of the rules around the colored cells and the width of the rules around "normal" cells. – Paul Gessler Mar 04 '14 at 20:19
  • This is just an artefact of the viewer. Voting to close. – Werner Mar 05 '14 at 15:21
  • @Werner i tried \hhline{} but in vain. – Fadwa Mar 05 '14 at 15:52
  • @Misaki: You don't show what you've tried, so we don't know why it doesn't work for you. Moreover, as I mentioned, this is a viewer-related mis-representation. When you zoom in, are the lines visible? – Werner Mar 05 '14 at 15:59
  • Yes they are visible but with a large zoom in – Fadwa Mar 05 '14 at 16:30

0 Answers0