Let $G$ be a group of order 12. Show that if $G$ contains a conjugacy class of order 4, the center of $G$ is $\lbrace 1\rbrace$.
So I got most of the proof but get stuck at a certain point. By the counting formula, I got that the order of the centralizer $C_G(x)$ of $x$ is 3. And that because $Z(G)\leq C_G(x)$ and $Z(G)\leq G$, then the order of $Z(G)$ must divide both the order of $G$ and the order of $C_G(x)$. Hence, we find that the order of $Z(G)$ is either 1 or 3.
This is where I get stuck. I know that the order of $Z(G)\neq 3$ because this would imply that $x\in Z(G)$ which can't happen and is a contradiction.
What I don't understand in the first place is, how do we know that $x$ cannot be in $Z(G)$? And why does $Z(G)$ having order 3 imply that $x\in Z(G)$?