# Missaligned tikz matrix [duplicate]

I'm trying to create a matrix of nodes that I will then use as a grid for overlaying my real nodes on top of it, but for some reason the grid appears misaligned once I overlay something on top of it, or put some content inside of the nodes.

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{matrix,fit}

\begin{document}

\begin{tikzpicture}
\matrix (table) [
matrix of nodes, nodes in empty cells,
row  sep=1mm, column sep=1mm, inner sep=0mm, outer sep=0mm,
nodes = { draw, minimum width=10mm, minimum height=10mm } ]
{
$Resc_1$ & & & & & & & & \\
$Resc_2$ & & & & & & & & \\
};
\end{tikzpicture}

\end{document}

What am I doing wrong? How can I align the first column with the rest of the matrix?

## marked as duplicate by Ignasi tikz-pgf StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Sep 10 '14 at 9:51

• @Ignasi: In my opinion, it is not a duplicate. My suggestion: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \matrix (table) [matrix of nodes, nodes in empty cells, row sep=-\pgflinewidth, column sep=-\pgflinewidth, nodes={draw,minimum width=10mm,minimum height=10mm,anchor=center}] { $Resc_1$ & & & & & & & & \\ $Resc_2$ & & & & & & & & \\ }; \end{tikzpicture} \end{document} – Black Mild Sep 19 at 8:46