I have an open rack of about 30 or so CDs in their cases about 12 inches from the computer and about 8 inches below the monitor. There is nothing between them. In general, I have good news for you. Neither the CDs nor the floppies will be ruined, but for different reasons. CDs store data optically, and floppies store data magnetically.
Floppies store data on a disk that contains material similar to a cassette tape.
A magnet in the floppy drive changes the magnetic state of this material. Any exposure to a powerful enough magnet can damage or even completely erase the data on floppy. Data is stored on a CD via a laser that burns tiny dots into a metal plate encased in the plastic disk. Because these dots are physical, the data is not affected by magnetic interference. And, if the monitor has not damaged the data on your floppies by now, it probably won't.