Image courtesy of Daniel J. Anderson, Salk Institute for Biological Studies.
During mitosis, the nuclear envelope disintegrates and the chromosomes (shown in red) line up in the metaphase plate. The chromosomes are pulled apart and the cell starts to divide. During the early stages, individual tubules of the endoplasmatic reticulum (ER; shown in green) bind directly to chromatin. Then, as mitosis proceeds, extra DNA binding proteins that reside in the ER progressively immobilize some of the tubules, flattening them out to create the nuclear membrane.