Complement of a Cartier Divisor Let $X$ be a smooth projective scheme and $D$ a Cartier divisor on $X$. 
If $U = X \setminus D$ then $\overline{U} = X$? 
I just need to know if that’s true and if anyone can suggest references where I can find such a result.
Thank you very much.
 A: You don't need to assume that $X$ is irreducible and you can actually prove that $X\setminus D$ is schematically dense (in particular, take a look at Proposition 9.19), which is more than being dense. 
Recall that a Cartier divisor $D$ on a ringed space $X$ admits a representation $\{(U_i,f_i)\}_{i\in I}$, where $X = \bigcup_{i\in I}U_i$ and $f_i\in \Gamma(U_i,\mathcal{O}_X)$ is such that for every point $x\in U_i$ the stalk of $f_i$ at $x$ is not a zero divisor in $\mathcal{O}_{X,x}$. 
Now assume that $X$ is a scheme. By passing to some open affine refinement of $\{U_i\}_{i\in I}$, we may assume that $U_i= \mathrm{Spec} A_i$ is affine for every $i\in I$. Clearly $f_i$ is not a zero divisor in $A_i$ for $i\in I$. But this implies that the localization $A_i\rightarrow \left(A_i\right)_{f_i}$ is injective for $i\in I$. Hence the restriction map $\Gamma(U_i,\mathcal{O}_X)\rightarrow \Gamma(U_i\setminus D,\mathcal{O}_X)$ is injective for each $i$. Thus if $j:X\setminus D\hookrightarrow X$ is an open immersion, then the induced map on sheaves $\mathcal{O}_X\rightarrow j_* \mathcal{O}_{X\setminus D}$ is injective. This means precisely that open immersion $j$ is schematically dense.
Now if $j$ is schematically dense, then it is has also dense image. Indeed, pick a nonempty open subset $V$ of $X$. Since $\mathcal{O}_X\rightarrow j_* \mathcal{O}_{X\setminus D}$ is injective, we deduce that the restriction map $\Gamma(V,\mathcal{O}_X)\rightarrow \Gamma(V\cap (X\setminus D),\mathcal{O}_X)$ is injective. Since $V$ is nonempty, we derive that $\Gamma(V,\mathcal{O}_X)\neq 0$ and hence $\Gamma(V\cap (X\setminus D),\mathcal{O}_X)\neq 0$. Thus $V\cap (X\setminus D)\neq \emptyset$ and $X\setminus D$ is dense. 
