In examples 1 and 2 p. 300 of Dummit's book it is written that the ideal $(2, x)$ is not principal in the ring $\mathbb{Z} [x]$ but it is principal in the ring $\mathbb{Q} [x]$.
To understand this by example I can see that no single element of $\mathbb{Z} [x]$ can generate both of $2x^2$ and $2x^3$ but what single element of $\mathbb{Q} [x]$ can generate both of $2x^2$ and $2x^3$?