[Tex/LaTex] tikz draw text inside rectangle above bottom border

positioningtikz-pgf

I am trying to draw a label centered inside a rectangle just above the bottom border and I cannot work out how to place it there using tikz. Could someone point out how I can place the label at this location

\documentclass[a4paper,11pt]{report}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture} [remember picture,overlay]
\node (rect) [rectangle, draw, minimum width=70mm, minimum height=100mm, anchor= south west] at (0,0) {};
\node (rect.center) {Centered Above Bottom Border};
\end{tikzpicture}
\end{document}

Best Answer

You can add a label at south of rect with an anchor south.

label={[anchor=south]south:Centered Above Bottom Border}

Code:

\documentclass[a4paper,11pt]{report}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture} [remember picture,overlay]
\node (rect) [rectangle, draw, minimum width=70mm, minimum height=100mm, anchor= south west,label={[anchor=south]south:Centered Above Bottom Border}] at (0,0) {};
%\node (rect.center) {Centered Above Bottom Border};
\end{tikzpicture}
\end{document}

If you want the label as a separate node, put the node at proper place:

\node[anchor=south] at (rect.south) {Centered Above Bottom Border};

Code:

\documentclass[a4paper,11pt]{report}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture} [remember picture,overlay]
\node (rect) [rectangle, draw, minimum width=70mm, minimum height=100mm, anchor= south west] at (0,0) {};
\node[anchor=south] at (rect.south) {Centered Above Bottom Border};
\end{tikzpicture}
\end{document}

enter image description here