TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

A rather high node has a not so high node on its rigth side.

I like the positioning and sizes, but i want both node to share the same Y-Axis of their north border.

\tikzstyle{big}  =[rectangle, draw=blue, text centered, minimum height=60]
\tikzstyle{small}=[rectangle, draw=black, text centered, minimum width=60]


\node[big]   (l) {Left  High};
\node[small] (r) [right of = l, anchor = west] {Rigth  Low};


Here is a brute force example where only the Y-Axis alignes the way i would like it.

\node[big]   (l) at (0,0) [anchor = north] {Left High};
\node[small] (r) at (3,0) [anchor = north] {Right Low};

My goal is to still use the [right of = l] notation and also use reference l.north somehow to set r.north = l.north.

share|improve this question
right of will position the node at a certain node distance from the other, by default using both the coordinate of their center; if you add anchor, you tell Tikz to refer to this coordinate to position the shape. Did you try \node[right of=l.north,anchor=north]? – Lionel MANSUY Feb 4 '13 at 12:50
up vote 5 down vote accepted

It's probably because you are using the positioning syntax with explicit at (coord) so that explicit coordinate wins over the positioning directive. Here are two examples


big/.style={rectangle, draw=blue, text centered, minimum height=60},
small/.style={rectangle, draw=black, text centered, minimum width=60}

\node[big] (l) at (0,0) {Left High};
\node[small,right= 3 cm of {l.north},anchor=north] (r) {Right Low};
\node[big,anchor=north west] (r2) at (r.north east) {righter};

enter image description here

share|improve this answer

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.