I'm trying to draw a nested structure like below. The idea is to make the nodes in the lower box fit perfectly into the drawn outline. How could this be done?
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{fit}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\node (0) {Hello};
\node (1) [right=3cm of 0] { World};
\draw (1) -- (0) node [below] {} ;
\node [fit= (1) (0), draw] (4) {};
\node (2) [below= of 0, ] {it's};
\node (3) [right=3cm of 2] {really really here};
\draw (2) -- (3) node [below] {};
\node [fit= (2) (3), below=of 4, draw] (5) {};
\draw (4) -- (5) node [right] {} ;
\node [fit= (4) (5), draw] (6) {};
\end{tikzpicture}
\end{document}
All I can manage to do is this, but here, the structure isn't aligned correctly, because I have to give the position of node 2 before nodes 2 and 3 are fitted together.
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{fit}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\node (0) {Hello};
\node (1) [right=3cm of 0] { World};
\draw (1) -- (0) node [below] {} ;
\node [fit= (1) (0), draw] (4) {};
\node (2) [below= of 0, ] {it's};
\node (3) [right=3cm of 2] {really really here};
\draw (2) -- (3) node [below] {};
\node [fit= (2) (3), draw] (5) {};
\draw (4) -- (5) node [right] {} ;
\node [fit= (4) (5), draw] (6) {};
\end{tikzpicture}
\end{document}
Rel
if it's necessary.)