Benjamin W Benjamin W - 4 months ago 12
Javascript Question

bootstrap not display mobile layout inside of iframe

I have a site create in bootstrap responsive layout, for some reason, i need to stored data at different server

on my original server I create a page with iframe width:100% height:100% to cover whole page.

My problem is the page doesn't display mobile phone's layout inside of iframe

anyone know how to solve this problem?

Answer

Try using this meta tag inside the head area of your iFrame page:

<meta name="viewport" content="width=device-width, initial-scale=1.0">