Theme lost in case of div and comes in case of iframe

I was trying a simple use case in which i embedded a vaadin component as a iframe and then as a div.

In case of iFrame i get the popu window properly as desired wtih default vaadin theme.

However, in case of div approach I dont see the window coming properly. I just see the contents of the window.

Any reasons for such different behavior in two cases?

Vik

Be sure to add the Vaadin theme stylesheet to your page’s HEAD

<link rel="stylesheet" type="text/css" href="/VAADIN/themes/example/styles.css">