# Column misalignment with multicolumn command

I have the following code that generates a table

\begin{tabular}{|c|c|c|c|} \hline
\multicolumn{4}{|c|}{A} \\ \hline
\multicolumn{2}{|c}{B} & \multicolumn{2}{|c|}{C} \\ \hline
D & E & F & G \\ \hline
&   &   &   \\ \hline
\end{tabular}

It works well except for the fact that there is a very minor shift in the alignment of the columns (see image below). I can't see why this is happening. Anyone know of a solution?

EDIT: A simple fix: moving the divider character from the start of the C label to the end of the B label.

\begin{tabular}{|c|c|c|c|} \hline
\multicolumn{4}{|c|}{A} \\ \hline
\multicolumn{2}{|c|}{B} & \multicolumn{2}{c|}{C} \\ \hline
D & E & F & G \\ \hline
&   &   &   \\ \hline
\end{tabular}
• I just ran it and it seems to be all right, two questions, have you tried zoom in and out (maybe a rendering deal with your pdf viewer)? can you please provide a MWE? – Hans Mar 5 '15 at 19:44
• It looks like you've already found the solution. Is that right? – Mico Mar 5 '15 at 19:45
• Your solution (edit) is correct, since the \multicolumn column specification allows you to have independent vertical rules for each cell... and since multiple vertical rules are allowed, you the location of | is important. – Werner Mar 5 '15 at 19:48