popup styling and markup generation