I'm new here. I just have a problem with the minipage environment. The problem is that the tables aren't horizontally aligned. I want these table aligned one by one, but I don't know what's wrong. Here is the code.
\centering
\begin{table}[h]
\begin{minipage}[c]{.2\linewidth}
\begin{tabular}{|cc|}
\hline
$n$ & $\theta(º)$ \\ \hline
1 & 13.558 \\ \rowcolor[gray]{0.7}
2 & 27.959 \\
3 & 44.690 \\ \rowcolor[gray]{0.7}
4 & 69.668 \\ \hline
\end{tabular}
\subcaption{Predicción teórica.} \label{kbrteo}
\end{minipage}%
\begin{minipage}[c]{.8\linewidth}
\begin{tabular}{|cccccccc|}
\hline
$n$ & $\theta(º)$ & $\delta \theta(º)$& $\theta(rad)$ & $\delta \theta(rad)$ & $sin\theta$ &$\delta sin\theta$ & $\frac{n\lambda}{2}$(\AA) \rule{0in}{10pt}\\ \hline
\cellcolor[gray]{0.2}& 12.2 & 0.01 & 0.213 & 0.002 & 0.211 & 0.002 & \cellcolor[gray]{0.2} \\
1 & 13.6 & 0.01 & 0.237 & 0.002 & 0.235 & 0.002 & 0.771 \\ \rowcolor[gray]{0.7}
2 & 27.9 & 0.01 & 0.487 & 0.002 & 0.468 & 0.002 & 1.542 \\
3 & 44.5 & 0.01 & 0.777 & 0.002 & 0.701 & 0.001 & 2.314 \\ \rowcolor[gray]{0.7}
4 & 69.1 & 0.01 & 1.206 & 0.002 & 0.934 & 0.001 & 3.085 \\\hline
\end{tabular}
\subcaption{Posiciones observadas.} \label{kbrexp}
\end{minipage}%
\caption{Estudio de las posiciones de los máximos de difracción para el KBr.}\label{kbr}
\end{table}