rich:popupPanel causes a line break wherever it is placed in the page. This is b/c the hidden top-level DIV uses 'visibility: hidden' rather than 'display: none;' to hide the panel. So, although the DIV is not visible, the page is laid out as if it was there.
After show and hide of popupPanel - correct style ('display: none;') is set.