TikZ-PGF – Left Alignment in TikZ

horizontal alignmenttikz-pgf

I'm not able to align the text left.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\newcommand{\altura}{.45cm}
\begin{document}

\begin{tikzpicture}[x=1cm, y=-\altura, node distance=0,outer sep=0,inner sep=0]
\tikzstyle{nome}=[draw, rectangle,anchor=west, minimum height=\altura,minimum width=9cm,fill=yellow!30]

\node[nome,right] (p1) {text};
\node[nome,right] (p2) [below = of p1] {text text};
\node[nome,right] (p3) [below  = of p2] {text text text};

\end{tikzpicture}
\end{document}

The left or anchor=west not work. I need the text align left.

Best Answer

You could add an option specifying the text width. It's automatically left justified then:

\tikzstyle{nome}=[draw, rectangle,anchor=west, minimum height=\altura,
  minimum width=9cm,fill=yellow!30,text width=8.8cm]

left aligned text in nodes