TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just started using TikZ an it's amazing. But I can't find out how to change the position of the label inside a node. At the moment I've:

\node (DataAccess) at (0,2) [draw,thick,minimum width=8cm,minimum height=2cm,
      align=center, rounded corners] {Datenzugriff};

But I'd like to have the text in the upper center (but inside) of the rectangle. Any idea?

share|improve this question
up vote 10 down vote accepted

You can use text depth:



\node (DataAccess) at (0,2) [draw,thick,minimum width=8cm,minimum height=2cm, align=center, text depth=2cm, rounded corners, label=below:User space] {Datenzugriff};\end{tikzpicture}


enter image description here

share|improve this answer
excellent, thank you a lot. – john84 Aug 9 '12 at 17:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.