When making tabularx one need to give a table width. For the outermost table, one can use \textwidth.
When making one or more inner table(s) inside outer table(s), the inner table(s) also need a width, which will be in this case the width of the column of the outer table that this inner table happened to be in. It is hard to keep track of the the context and to manually give hardcoded values.
I am not able to figure how to tell LaTeX to use all the available column width from the outer table, and let LaTeX do the calculation. Need something similar to X but for the tablewidth itself.
Here is a MWE one one table inside another.
\documentclass[10pt,notitlepage]{article}%
\usepackage{tabularx}
\usepackage{hyperref}
\usepackage{array}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\begin{document}
%have to use tabular* for outer table since I can't figure how to use tabularx
\begin{tabular*}{\textwidth}{|p{0.5\textwidth}|p{0.5\textwidth}|}\hline
\begin{tabularx}{0.5\textwidth}{@{}|Y|Y|Y|@{}}\hline % how to automate this?
% instead of 0.5\textwidth
% use full column width
\href{foo/index.htm}{A}
\begin{enumerate}
\item item 1
\item item 2
\end{enumerate}&
\href{foo/index.htm}{B}&
\href{foo/index.htm}{C}\\\hline
\end{tabularx}
&
second column
\end{tabular*}
\end{document}

